Repository navigation
ci(bench): measure bundle sizes with Vite 8's default minifier - #1792
Merged
Merged
Conversation
The bundle-size and bundle-reachability harnesses forced Vite's `minify: 'esbuild'`. That mode turns Rolldown's own minifier off, and with it the dead-code elimination that removes branches guarded by a never-written module flag, so the numbers were not what a Vite app ships. - run.mjs builds every framework with `minify: 'oxc'` (Vite 8's default client minifier), still identical settings for every target. - run-minimal.mjs builds its Vite scenarios with `'oxc'`; the esbuild bundler scenarios keep esbuild's `minify: true`. The async-identity encoder check accepts Oxc's template-literal quotes. - Every budget is ratcheted down (144 lowered, 15 unchanged, 0 raised), the bundle-size baseline is re-recorded, the 18 cross-framework ratio guards are re-cut, and the website summary and copy follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inifier # Conflicts: # benchmarks/bundle-size/app-budgets.json # benchmarks/bundle-size/jsx-budgets.json # benchmarks/bundle-size/minimal-budgets.json
Budgets move by the measured esbuild-to-Oxc difference on the same source (budget - max(0, esbuild - oxc)), so the methodology change lowers 131 values, keeps 28, raises none, and leaves the headroom #1782 granted to #1783 in place. The baseline, ratio guards and website summary are recomputed from the merged source. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inifier # Conflicts: # benchmarks/bundle-size/app-budgets.json # benchmarks/bundle-size/jsx-budgets.json # benchmarks/bundle-size/minimal-budgets.json
trueadm
marked this pull request as ready for review
October 5, 2026 20:49
Contributor
Benchmark report
Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)
0 other measured values are unchanged. Public-import reachability bundles (bytes)
27 other measured values are unchanged. |
The smoke test rounds each summary row to 15 significant digits because Math.log/exp can differ by one ULP between libc implementations, but it compared the bundle-size range ends exactly. Those ends are geometric means too: the recorded Solid ceiling was 0.9500824085923075 on macOS and 0.9500824085923076 on the Linux runner. Round them the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
…inifier # Conflicts: # benchmarks/bundle-size/app-budgets.json # benchmarks/bundle-size/minimal-budgets.json
…#1772 and #1794 Same method as before: each budget is main's value minus the measured esbuild-to-Oxc difference on the merged source, never raised (131 lowered, 28 unchanged). The baseline record and home summary follow the new bytes; every ratio guard still holds with the ceilings already cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1783 landed and spent the headroom #1782/#1793/#1794 granted it. Each budget is again main's value minus the measured esbuild-to-Oxc difference on the merged source (131 lowered, 28 unchanged, none raised). The baseline record, home summary and refresh note follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inifier # Conflicts: # benchmarks/bundle-size/app-budgets.json # benchmarks/bundle-size/jsx-budgets.json # benchmarks/bundle-size/minimal-budgets.json
This was referenced Oct 5, 2026
…inifier # Conflicts: # benchmarks/bundle-size/minimal-budgets.json
…inifier # Conflicts: # benchmarks/bundle-size/minimal-budgets.json
…inifier # Conflicts: # benchmarks/bundle-size/app-budgets.json # benchmarks/bundle-size/jsx-budgets.json # benchmarks/bundle-size/minimal-budgets.json
With #1784's hydrating flag folded by Oxc, Octane's totals shrink 8.5-10% instead of about 5%, so the total-gzip ceilings had grown about 6% loose. They are re-cut at about 1.5% headroom on the merged-source measurement; application-code ceilings are unchanged. All 72 bundle-size guards hold. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 tasks done
This was referenced Oct 6, 2026
trueadm
added a commit
that referenced
this pull request
Oct 6, 2026
… overage (#1811) - deferred-hydration (raw 230,846 -> 230,980, gzip 72,314 -> 72,387): #1803 routes hydration's boundary operations through a table that tryBlock installs, so hydrating bundles without Suspense drop about 8.6 kB gzip. A hydrating bundle that renders a boundary pays for the indirection. - todo framework/total raw (+43 each): main already measures 115,067 raw against a 115,056 budget. #1808, merged after #1792 re-derived the budgets under oxc, adds a few bytes to input-handling paths. #1803 does not change todo; the framework gzip is identical with either runtime. Values are measured + 32. Co-authored-by: Claude Opus 5.5 <[email protected]>
trueadm
added a commit
that referenced
this pull request
Oct 6, 2026
Resolve the budget conflicts against main after #1792 re-cut every budget for Vite's oxc minifier: take main's budgets and lower the values this branch now measures below them (min(main, measured + headroom)); none is raised. Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm
added a commit
that referenced
this pull request
Oct 6, 2026
Conflicts: - pnpm-lock.yaml: keep this branch's TSRX versions under main's @types/node 24.13.3 peer context. `pnpm install --lockfile-only` (pnpm 12.9.1) leaves the result unchanged. - 87 react-parity manifests: lockfileSha256 regenerated for the merged lockfile (react-parity:lockfiles:generate). - website BenchBars.tsrx and BenchmarkExplorer.tsrx: this branch only reformatted them, so take main's #1738 version and reformat it. - user-apps-v1 manifest.jsonl: regenerated by pnpm sync. - minimal-budgets.json: main re-baselined suspense-transition and binding-apollo-client-vite under the Oxc minifier (#1792), so this branch's earlier raises for the reformat are dropped. Reformat the 16 .tsrx files main added or changed in the old layout. Their client and server output is unchanged once position-derived ids are masked, and all 51 .tsrx files main touched compile in both modes. The reformat moves position-derived ids, which makes some bundles a few bytes smaller than main's budgets allow under the ratchet, so tighten them: context gzip -2, suspense-transition gzip -1, apollo esbuild brotli -99, bindings total raw -12. The bindings app and total gzip are set 27 bytes over the local measurement rather than 32, because CI has measured that app's gzip 5 bytes below local. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Summary
The bundle-size benchmarks now build with Vite 8's default minifier (
'oxc') instead of a forcedminify: 'esbuild', so they measure what a real Vite application ships. Dominic decided this on 2026-10-05.run.mjsbuilds every framework target, and every framework's ceiling, withminify: 'oxc'. All frameworks still get identical settings (minify: 'oxc',target: 'esnext').run-minimal.mjsbuilds its Vite scenarios with'oxc'. The esbuild-bundler scenarios keep esbuild'sminify: truebecause they represent esbuild users; their bytes are unchanged.budget-raises.mjs --base origin/mainreports "no committed byte budget was raised", so no budget-only PR is needed.bundle-sizebaseline is re-recorded, the 18 cross-framework ratio guards are re-cut, and the website's home summary and card copy follow.Why
Vite's
'esbuild'mode sets Rolldown'soutput.minifytofalseand minifies each chunk afterwards with esbuild ([email protected],dist/node/chunks/node.js,buildOutputOptions). That drops Rolldown's own minifier, and with it the dead-code elimination that removes branches guarded by a never-written module flag. Applications get'oxc'unless they opt out. That gap matters for #1784's Svelte 5-stylehydratingflag: a prototype saved 3.0 kB gzip on a createRoot probe and 1.3 kB on the js-framework app, but only under Vite's default minifier.The fixture apps' own
vite.config.jsfiles keep'esbuild', because the timing suites build from them.run.mjstherefore names'oxc'inline, and its inline config already wins over the app config for these keys.Before / after, total gzip bytes per fixture
Both columns were measured from the same source,
mainat91079dde42(#1784), on the same machine. Every framework shrinks under Oxc. Svelte 5 and Vue Vapor shrink most, consistent with module-flag folding that esbuild's per-chunk pass cannot do.Octane (.tsrx) budgeted apps, gzip, application / framework
Reachability scenarios (run-minimal.mjs), gzip
Raw and brotli move the same way. No Octane metric grows in any app. The only increases anywhere are React weather
app_brotli(+9 B, no budget) andserver-hooksbrotli (+2 B, inside its budget).How the budgets move: by the methodology difference, not a fresh re-cut
main's budgets are not all at measured + 32. While this PR was open, #1782, #1793 and #1794 raised budgets ahead of #1783; #1782 alone raised 103 values by a median of +324 B. A fresh--write-budgetswould have erased that headroom and forced yet another budget PR for #1783. This PR changes only the ruler, so each budget moves by the difference the new minifier makes on the same source:main's was at esbuild + 32.mainalready had; the largest are weather framework brotli +76 andbinding-apollo-client-esbuildbrotli +70.A strict re-cut to Oxc + 32 (
--write-budgetsonce per harness) would now move only those 28 small values.Ratio guards (
benchmarks/baselines/ratios.json)One guard, rows total gzip versus Svelte 5, breaches
main's ceiling under the new methodology even though Octane shrank, because Svelte's framework bytes fall 16–19% under Oxc. All 18 cross-framework guards are re-cut at the current ratio plus about 1.5% headroom, in line with the existing notes' 1–1.8%. Each note records both measurements on the merged source with #1784. The total-gzip ceilings mostly tighten, because #1784's flag folds under Oxc and Octane's totals now shrink 8.5–10%. The 159maxRatio: 1budget guards are unchanged, because they read the budget files.app_gzipoctane-jsx / octane-tsrxjs_gzipoctane-tsrx / ripplejs_gzipoctane-tsrx / solidapp_gzipoctane-tsrx / rippleapp_gzipoctane-tsrx / solidtodo_app_gzipoctane-tsrx / solidtodo_app_gzipoctane-tsrx / ripplechat_app_gzipoctane-tsrx / solidchat_app_gzipoctane-tsrx / ripplejs_gzipoctane-tsrx / svelteapp_gzipoctane-tsrx / sveltetodo_js_gzipoctane-tsrx / sveltetodo_app_gzipoctane-tsrx / sveltechat_js_gzipoctane-tsrx / sveltechat_app_gzipoctane-tsrx / svelteweather_js_gzipoctane-tsrx / reactweather_app_gzipoctane-tsrx / reactweather_fw_gzipoctane-tsrx / reactChanges
benchmarks/bundle-size/run.mjs,run-minimal.mjs,apps/bindings/octane-tsrx/vite.config.js: Oxc for the Vite builds, with the fairness note updated. Theserver-renderreachability check matched the async-identity encoder'spadStart(4, "0")with["']quotes. Oxc prints`0`, so the class now accepts a backtick. This is a harness pattern fix, not a bundle change.minimal-budgets.json,app-budgets.json,jsx-budgets.json: shifted as above.benchmarks/baselines/local/bundle-size.json: thebench.mjs --record bundle-sizepayload. Its*-budgettargets mirror the budget files.website/tests/smoke.test.ts: theHOME_SUMMARYcheck rounded summary rows to 15 significant digits, becauseMath.log/expcan differ by one ULP between libc builds. It compared the bundle-size ceilings (added in feat(bench): show bundle-size as a range up to the whole client runtime #1738) exactly, and CI's Linux runner produced a Solid ceiling of …3076 where macOS gives …3075. The ceilings now go through the same rounding.benchmarks/baselines/ratios.json: the 18 guards above.website/src/content/home-benchmark.ts: thebundle-sizerow and ceilings, recomputed withcreateHomeSummary(FRAMEWORK_CARDS). No other summary row changes.website/src/content/benchmarks.ts: the card copy now names the minifier instead of "normalized minification".benchmarks/README.md,benchmarks/baselines/website-refresh.md: the minifier statements, plus a dated note that the bundle-size record now comes frommainat91079dde42(fix(octane): handle hydration mismatches like React 19 (boundary/root client-render fallback) #1784), not the 0.8.0 release source.Left as they are:
minify: 'esbuild'.audit-local-void-roots.mjs, which reproduces a frozen 2026-09-19 report.docs/.Coordination with #1784
#1784 merged on 2026-10-06 and this branch now contains it. Its Svelte 5-style
hydratingflag is exactly the case this PR exists for:Because the budgets move by the measured esbuild→Oxc difference, those Oxc-only savings are banked here. #1784's
run-hydration-free.mjsgate already builds with Vite's default minifier, so it and these budgets now measure the same thing.Validation
mainat91079dde42(fix(octane): handle hydration mismatches like React 19 (boundary/root client-render fallback) #1784)):run.mjsandrun-minimal.mjs(all exit 0) withBENCH_JSON. Node 24.18.0, macOS 27.0, Apple M5 Max, Vite 8.1.5, frozen lockfile. I re-measured after each runtime change onmain(fix(octane): resolve a component's signal handles from its nested@{ … }blocks #1761; fix(octane): resume a query read only through a declared handle on the server #1766, fix(octane): keep captured queries lazy through guarded rerenders #1768, fix(octane): retain hook boundaries for opaque property reads #1770, fix(octane): refuse an early host whose neighbor was removed while hydration was suspended #1772; fix(octane): abort pending queries whose owner a retried attempt replaces #1783; fix(octane): resolve a component's signal handles from its Hydrate children #1781, fix: reduce Suspense retry reveal window to 100ms #1798; fix(octane): handle hydration mismatches like React 19 (boundary/root client-render fallback) #1784). Budget-only merges (ci(bench): raise byte budgets for the pending query owner fix on top of #1761 #1793, ci(bench): raise byte budgets for lite-scope retry pruning in #1783 #1794, ci(bench): raise byte budgets for the children and Hydrate signal owner fix #1797, ci(bench): raise the deferred-hydration gzip budget for #1784's review fixes #1807) reuse the measured difference.bundle-sizeratio guards hold against the recorded baseline.bench.mjs --recordmatched its pass byte for byte.website/tests/smoke.test.ts("publishes each framework…") passes locally. It was the only failure in the first CI run; shard 2 was cancelled by fail-fast.node benchmarks/bundle-size/budget-raises.mjs --base origin/main: no raise.pnpm sync(no changes),pnpm format:files:check,pnpm typecheck:fileson the two website modules.pnpm format:check,pnpm typecheck,pnpm test: not run locally, per the repo's current local-load rule. CI covers them.Risk / follow-ups
main's budget.main. Its growth will be about the same or slightly smaller.Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Changes benchmark methodology, baselines, and CI byte gates only; no production runtime or application shipping path is modified.
Overview
Bundle-size and reachability benchmarks now build Vite fixtures with
minify: 'oxc'(Vite 8’s default) instead of forcingminify: 'esbuild', so shipped-byte gates reflect what typical Vite apps actually minify with—including Rolldown’s DCE that esbuild-only mode skips.Harness updates:
run.mjsandrun-minimal.mjsset Oxc for Vite builds (esbuild reachability scenarios still useminify: true); docs and site copy describe the new ruler. Committed baselines, Octane byte budgets, and 18 cross-framework ratio ceilings are re-cut to the new measurements (budgets shifted down where Oxc is smaller, ratios adjusted with notes—especially vs Svelte, whose framework chunks shrink more under Oxc). A small reachability regex accepts Oxc’s backtick inpadStart(4, \0`)`, and website smoke tests round chart ceilings like summary rows for cross-platform float noise.Reviewed by Cursor Bugbot for commit 5eaa0da. Bugbot is set up for automated code reviews on this repo. Configure here.