Conversation
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.12 MiB | 2.12 MiB | 0 B (0.00%) |
packages/core/dist |
Directory total | 3.95 MiB | 3.95 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 6.07 MiB | 6.07 MiB | 0 B (0.00%) |
vp (Linux x64) |
Binary | 11.28 MiB | 11.28 MiB | 0 B (0.00%) |
vp (Linux x64) |
gzip -9 | 4.88 MiB | 4.88 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | Binary | 32.11 MiB | 32.13 MiB | +16.00 KiB (+0.05%) |
| NAPI (Linux x64) | gzip -9 | 12.74 MiB | 12.74 MiB | +4.38 KiB (+0.03%) |
vp (macOS ARM64) |
Binary | 8.41 MiB | 8.41 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
gzip -9 | 4.26 MiB | 4.26 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | Binary | 39.72 MiB | 39.72 MiB | +16 B (+0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 17.04 MiB | 17.05 MiB | +7.02 KiB (+0.04%) |
vp (Windows x64) |
Binary | 9.16 MiB | 9.16 MiB | 0 B (0.00%) |
vp (Windows x64) |
gzip -9 | 4.00 MiB | 4.00 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | Binary | 27.07 MiB | 27.09 MiB | +18.00 KiB (+0.06%) |
| NAPI (Windows x64) | gzip -9 | 10.84 MiB | 10.84 MiB | +7.33 KiB (+0.07%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.09 KiB | 7.09 KiB | -1 B (-0.01%) |
| Installer (Windows x64) | Binary | 4.56 MiB | 4.56 MiB | 0 B (0.00%) |
| Installer (Windows x64) | gzip -9 | 2.13 MiB | 2.13 MiB | 0 B (0.00%) |
|
Benchmark run for PR head 6 case(s) changed by more than ±5% in median time. Negative changes are faster; positive changes are slower. Config performanceBaseline revision: Current revision:
Fresh processes, warm filesystem and Node compile caches. Config logging is disabled during timing.
|
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://perf-static-config-metadata-viteplus-dev.voidzero-docs.workers.dev (commit 68fe5af)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
The same-runner comparison confirms that the second optimization reduces config loading time. The earlier cross-run report did not isolate the code change. Controlled CI run: Linux x64, Node
The elapsed-time column shows medians. CPU time is the median of The original reports used different runners and compared historical medians. Matching Both CI source revisions differ only by this optimization. Dependency changes and unrelated merge commits are excluded. The original jobs lack CPU scheduling and frequency telemetry, so the precise host-level cause cannot be recovered. Their cache-hit versus fresh-build difference is not independently proven causal. The exact-fixture local repeat also improves literal checks by 7.6–10.1%. Local debug and CI release builds explain why their absolute times and percentages differ. The benchmark should compare base and head within one job, with balanced execution order and separate warm compile caches. Keep ±5% comments based on those measurements; use historical artifacts for trends. The temporary diagnostic instrumentation will be removed from the product PR. |
This reverts commit d87053e.
The check process initializes Vite even when
vite.config.*exports only literal metadata. Read these configs withvp_static_configbefore calling the JavaScript resolver.Accept a single
export defaultobject with literallint,fmt,check,run, orstagedfields. Imports, config functions, plugin hooks, Vite settings, and executable statements retain runtime resolution. Each call reads the file again so later commands observe changes.Tool processes still resolve their own configs. The existing benchmark measures static exports and the
defineConfigfallback separately.Single-run comparison with
timeBefore:
76ce17ced. After:0afe9b5c9. Each case ran once per version without warmup. Both versions used debug native bindings on Apple M4 Max, macOS26.2, and Nodev22.23.2.The fixture contains three unformatted TypeScript files in
packages/app/src. Config cases useexport default { lint: {}, fmt: {} };. Each invocation starts with identical files and an emptyNODE_COMPILE_CACHEdirectory.The columns show
real / user / sysfrom/usr/bin/time -p, in seconds. The no-config and standalone-tool cases are controls; their variation also shows single-run noise.check --fixcheck --fixfmtlint --fixcheck --fixExample invocation from the fixture root:
Set
$CHECKOUTto the before or after worktree. Point the fixture'snode_modules/vite-pluslink to that worktree'spackages/cli. Reset the input files before each invocation. Package cases run frompackages/appwithsrc/*.tsas the file arguments.Controlled Linux comparison
CI run compares native revisions
76ce17cedand0afe9b5c9on one runner. Both use release bindings, Nodev22.18.0, identical JavaScript, and the original CI fixtures.The following medians use 21 samples per version and case. CPU time is
user + sysfrom/usr/bin/time -p.root/check/minimalroot/check/defineConfigpackage/check/minimalpackage/check/blocksroot/fmt/minimalroot/staged/minimalA third CLI snapshot uses the same optimized native binary. Its median differences stay within 1.2%. Each snapshot uses a separate warm compile cache.
Historical measurements from different runners do not isolate the code change. Use the comparison above to assess the second optimization.
Stacked on #2782. Related to #2698.