Skip to content

ci(bundle-size): raise gzip budgets for the lazy Block record (#1896) - #1906

Closed
trueadm wants to merge 3 commits into
mainfrom
ci/slim-block-budgets
Closed

trueadm wants to merge 3 commits into
mainfrom
ci/slim-block-budgets

Conversation

@trueadm

@trueadm trueadm commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is a budget-only change for #1896, which moves feature-only Block state to a lazy record. It changes only bundle budget files.

#1896 makes cold mounts faster. Paired against main:

Suite Speedup
memo-wall −4.0%
portal-swarm −1.9%
recursive-context −1.5% to −2.7%
spa-navigation nav_mount −2.1%

Its raw bytes drop by 8–84 B in every reachable scenario. Gzip grows by 33–111 B, because the block.rare?.field reads at boundary, thenable and effect-event sites compress worse than the repetitive constructor lines they replace. Two Brotli values also cross their 256-byte allowance.

Changes

Raise only the 48 values that #1896's head exceeds: 36 gzip and 12 Brotli. Each new limit is #1896's measurement plus the repository's 32-byte gzip or 256-byte Brotli allowance, from --write-budgets on #1896 merged with main 68aa48102b (main's own budgets set to its measured bytes after #1892). No raw budget and no unrelated scenario gets more headroom. #1896 lowers the 36 raw ceilings it shrinks.

Local main measurements matched CI byte for byte on every minimal row (checked on 2f81266018).

Ordering: merge this immediately before #1896. If #1905 (for #1899) or #1887 lands first, these values need re-measuring on top of it.

Every raised ceiling (bytes)
File Budget Current Proposed Δ
minimal-budgets.json cli-spa-starter.gzip 34123 34182 +59
minimal-budgets.json root-static-specialized.gzip 23961 24001 +40
minimal-budgets.json root-static-specialized.brotli 21377 21684 +307
minimal-budgets.json root-chained-jsx.gzip 24454 24493 +39
minimal-budgets.json root-static.gzip 52416 52469 +53
minimal-budgets.json root-static-local.gzip 23946 23985 +39
minimal-budgets.json root-callback-local.brotli 21916 22178 +262
minimal-budgets.json hooks-state.gzip 27899 27955 +56
minimal-budgets.json prop-attributes.gzip 27887 27947 +60
minimal-budgets.json prop-attributes.brotli 24869 25187 +318
minimal-budgets.json context.gzip 31593 31640 +47
minimal-budgets.json hydrate-root.gzip 44303 44366 +63
minimal-budgets.json hydrate-root.brotli 38747 39040 +293
minimal-budgets.json deferred-hydration.gzip 69844 69918 +74
minimal-budgets.json hydrate-frame.gzip 113638 113740 +102
minimal-budgets.json hydrate-frame.brotli 97254 97537 +283
minimal-budgets.json suspense-transition.gzip 44859 44949 +90
minimal-budgets.json component-owned-effects.gzip 25279 25329 +50
minimal-budgets.json component-owned-effects.brotli 22600 22892 +292
minimal-budgets.json binding-hooks.gzip 27544 27579 +35
minimal-budgets.json binding-base-ui-vite.gzip 62881 62951 +70
minimal-budgets.json binding-base-ui-esbuild.gzip 69837 69899 +62
minimal-budgets.json binding-radix-vite.gzip 63484 63545 +61
minimal-budgets.json binding-radix-esbuild.gzip 70416 70496 +80
minimal-budgets.json binding-mantine-hooks-vite.gzip 28495 28557 +62
minimal-budgets.json binding-mantine-hooks-esbuild.gzip 30639 30724 +85
minimal-budgets.json binding-mantine-hooks-esbuild.brotli 27258 27628 +370
minimal-budgets.json binding-apollo-client-vite.gzip 105175 105268 +93
minimal-budgets.json binding-apollo-client-esbuild.gzip 116168 116291 +123
minimal-budgets.json binding-usehooks-ts-vite.gzip 28730 28779 +49
minimal-budgets.json binding-usehooks-ts-esbuild.gzip 30880 30969 +89
app-budgets.json rows.framework.gzip 34668 34708 +40
app-budgets.json rows.total.gzip 37005 37043 +38
app-budgets.json todo.framework.gzip 37582 37652 +70
app-budgets.json todo.framework.brotli 33149 33465 +316
app-budgets.json todo.total.gzip 39802 39872 +70
app-budgets.json todo.total.brotli 35035 35346 +311
app-budgets.json chat.framework.gzip 36912 36975 +63
app-budgets.json chat.framework.brotli 32572 32849 +277
app-budgets.json chat.total.gzip 39628 39690 +62
app-budgets.json chat.total.brotli 34960 35236 +276
app-budgets.json weather.framework.gzip 43149 43238 +89
app-budgets.json weather.total.gzip 51021 51110 +89
app-budgets.json weather.total.brotli 44510 44771 +261
app-budgets.json bindings.framework.gzip 109471 109545 +74
app-budgets.json bindings.total.gzip 225138 225210 +72
jsx-budgets.json framework.gzip 56783 56863 +80
jsx-budgets.json total.gzip 59640 59719 +79

Validation

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Benchmark threshold JSON only; no application or framework runtime behavior changes.

Overview
Updates only bundle-size budget JSON (app-budgets.json, jsx-budgets.json, minimal-budgets.json) so CI keeps passing after the companion change that moves feature-only Block state to a lazy record (#1896).

Gzip ceilings go up on 36 entries (roughly +35–123 B per line); Brotli on 12 entries where measurements cross the existing allowance. Raw budgets and untouched scenarios are unchanged—this is headroom for slightly larger compressed framework bundles (block.rare?.field-style reads compress worse than the constructor lines they replace), not new runtime code.

Intended to merge immediately before #1896; if other budget-affecting PRs land first, these numbers need re-measurement with --write-budgets.

Reviewed by Cursor Bugbot for commit ec55fbd. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline labels Oct 8, 2026
@trueadm
trueadm marked this pull request as ready for review October 8, 2026 15:05
@trueadm
trueadm marked this pull request as draft October 8, 2026 15:09
@trueadm

trueadm commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

On hold: these values are now too low. main 78750a0777 (#1892) landed after e14fbdf9ac ratcheted main's budgets, which seems to have removed #1893's raise. main is now over its own ceilings: rows.framework raw needs about 106,456 against a budget of 106,263, independent of #1896, which only lowers raw bytes.

Once main gets its raise-only fix for #1892, I'll re-measure #1896 on top of it and update these values.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No budget breaches, no added work, and no timing changes beyond ±3%.

Compares e14fbdf9a, the merge commit's first parent with d04cfb3a3 on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 6.200 4.592 −2.9% −28.8% … ±0.0% ⚪ within noise
octane-tsrx replace 10.125 11.125 +2.4% −5.0% … +33.2% ⚪ within noise
octane-tsrx add 4.567 4.325 +1.6% −3.2% … +6.9% ⚪ within noise
octane-tsrx update 0.154 0.144 −0.8% −2.2% … +3.5% ⚪ within noise
octane-tsrx select 0.011 0.011 +0.3% −17.2% … +27.3% ⚪ within noise
octane-tsrx swap 0.046 0.046 −0.7% −5.4% … +1.4% ⚪ within noise
octane-tsrx remove 0.019 0.018 −0.8% −2.3% … +0.4% ⚪ within noise
octane-tsrx runlots 38.733 38.175 +0.6% −8.0% … +10.2% ⚪ within noise
octane-tsrx select_lots 0.008 0.010 +0.7% −2.4% … +10.3% ⚪ within noise
octane-tsrx clear 49.458 50.283 +6.9% +2.8% … +30.7% ⚪ within noise
octane-jsx run 3.783 3.942 −1.4% −6.9% … +2.6% ⚪ within noise
octane-jsx replace 7.500 7.433 −2.9% −10.1% … +3.1% ⚪ within noise
octane-jsx add 3.958 4.700 +2.6% −2.5% … +12.2% ⚪ within noise
octane-jsx update 0.301 0.314 +2.8% −0.4% … +5.0% ⚪ within noise
octane-jsx select 0.162 0.159 −2.4% −4.6% … +0.7% ⚪ within noise
octane-jsx swap 0.280 0.273 −2.5% −6.5% … +0.0% ⚪ within noise
octane-jsx remove 0.210 0.207 −2.1% −4.4% … −0.6% ⚪ within noise
octane-jsx runlots 39.950 42.100 −1.4% −4.4% … +2.7% ⚪ within noise
octane-jsx select_lots 2.302 2.306 +2.2% −10.4% … +8.9% ⚪ within noise
octane-jsx clear 50.708 54.175 −3.4% −18.3% … +8.6% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 60 measured values.

Public-import reachability bundles (bytes)

No changes across 111 measured values.

@trueadm
trueadm marked this pull request as ready for review October 8, 2026 15:25
trueadm added a commit that referenced this pull request Oct 8, 2026
Measured over main 68aa481 with --write-budgets; only raw rows that
this branch makes smaller. The matching gzip and Brotli raises are the
budget-only #1906, which merges first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm trueadm closed this Oct 8, 2026
trueadm added a commit that referenced this pull request Oct 8, 2026
* perf(octane): move feature-only Block state to a lazy record

Fourteen BlockImpl fields served only Suspense/try/Activity boundaries,
use() thenables, fetch-tree warming, the commit-callback update guard,
useEffectEvent and ViewTransition. They now live on a `rare` record that
blockRare() allocates from one literal the first time a feature needs it.
BlockImpl drops from 79 to 66 fields and its constructor bytecode from 437
to 371 bytes; LiteBlockImpl carries `rare: null` so parentBlock walks stay
uniform.

Paired cold mounts (Chromium, 40 fresh pages): memo-wall 0.960, portal-swarm
0.981, recursive-context 0.985 against main. Adds a regression test for the
per-render use() call-position reset that now runs only when the record exists.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(bundle-size): lower the raw budgets the lazy Block record shrinks

Measured over main 68aa481 with --write-budgets; only raw rows that
this branch makes smaller. The matching gzip and Brotli raises are the
budget-only #1906, which merges first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant