perf(dev): bound light webpack runtime - #587
Draft
beruro wants to merge 3 commits into
Draft
Conversation
beruro
force-pushed
the
junyu/light-dev-webpack-config
branch
from
July 30, 2026 15:10
bdeda38 to
459275b
Compare
beruro
marked this pull request as draft
August 10, 2026 03:35
beruro
force-pushed
the
junyu/light-dev-webpack-config
branch
from
August 10, 2026 04:04
df990b2 to
350ff60
Compare
beruro
force-pushed
the
junyu/light-dev-webpack-config
branch
from
August 10, 2026 05:18
3681d62 to
888e4d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Light development inherited webpack's persistent filesystem cache even though the process is intentionally disposable. On the current
developbaseline that cache wrote about 1.57 GiB undernode_modules/.cache/webpack, while startup and repeated rebuilds remained slow. A memory-only cache removes the disk write and improves latency, but without a process limit it reached about 3.10 GiB RSS across ten rebuilds on the same bundle, so cache selection alone does not provide a reliable runtime bound.Solution
dev-11filesystem caching and production keeps its isolatedprod-11/prod-fast-11caches.NODE_OPTIONSare preserved, and an explicit user--max-old-space-size/--max_old_space_sizesetting wins.Potential risks
Verification
Configuration and correctness checks on published head
888e4d590, rebased ontodevelopat9a2d6f6cf:node --test scripts/dev/tauri-dev-processes.test.cjs scripts/dev/webpack-config-light.test.cjs— passed, 18/18 tests.node --check scripts/dev/tauri.js,node --check scripts/dev/tauri-dev-processes.cjs, andnode --check webpack.config.js— passed.pnpm exec tsc --noEmit— passed.pnpm exec prettier --check scripts/dev/tauri.js scripts/dev/tauri-dev-processes.cjs scripts/dev/tauri-dev-processes.test.cjs scripts/dev/webpack-config-light.test.cjs webpack.config.js— passed.git diff --checkplus scope/secrets/personal-path/debug-output inspection — passed; the final diff is limited to five light-dev configuration, launcher, and regression-test files.eslint --no-ignorewas attempted but is not a valid project gate because the repository ESLint config does not declare Node globals for these ignored files; Node tests, syntax checks, Prettier, and the commit hook are the applicable checks.Performance lifecycle method:
pnpm install --frozen-lockfile.WEBPACK_STATUS:done_initial, requested/main.js, sampled the webpack PID RSS every 250 ms, touchedsrc/index.tsxten times, waited for a successfulWEBPACK_STATUS:doneafter each touch, sampled a 30-second steady window, inspected cache bytes, and sentSIGTERM.develop: lifecycle ready in 39.5 s; ten rebuilds in 3.2–8.8 s; observed rebuild peak 1.72 GiB; steady median 1.23 GiB; filesystem cache 1.57 GiB.WEBPACK_STATUS:errorand exited successfully afterSIGTERM.maxGenerations: 0candidate was rejected after failing to complete the lifecycle within ten minutes and its experimental change was fully reverted.Performance verdict: PASS for bounded light-process growth, disk-cache elimination, faster startup/rebuilds, and clean lifecycle teardown, with the measured +18% early peak versus the filesystem-cache baseline explicitly accepted as the remaining tradeoff.
GitHub CI is running on the published head. The PR remains Draft until the new frontend, Rust, and attribution checks pass.