Skip to content

ci(bench): raise byte budgets for urgent layout-effect updates - #1685

Merged
trueadm merged 1 commit into
mainfrom
ci/layout-effect-priority-budgets
Oct 3, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/layout-effect-priority-budgets

Conversation

@trueadm

@trueadm trueadm commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Raises 51 byte budgets for the commit-phase update priority fix in the useLayoutSnapshot follow-up (branch fix/layout-snapshot-review, stacked on #1677). This PR changes only budget files, as CONTRIBUTING.md ("Size budgets") requires.

Why the growth is worth it. Today, while an async Action is pending, a setState in a useLayoutEffect (the usual measure-then-render pattern) is staged into that Action and stays hidden until it settles. A commit flushed inside a startTransition callback also turns its layout-effect updates into transitions. React clears the ambient transition for a commit, so those updates are urgent there. The fix adds an inCommitCallback() check to the three places that pick the Action batch or priority, and clears TRANSITION_DEPTH / ACTIVE_TRANSITION_ACTION_BATCH once per commitEffects. That code is in the core scheduler and commit path, which every bundle carries. A capability gate would need its own call sites in that same path, so it would not stay under the 32-byte headroom either.

I measured with Node 24 on the fix branch merged with main at 12c32ec, using run-minimal.mjs --write-budgets and run.mjs --write-budgets octane-tsrx octane-jsx. I kept only the raises. That command would also lower 23 unrelated budgets to bank savings already on main, and I left those out.

File Budget Before After Change
minimal-budgets.json cli-spa-starter.raw 115075 115166 +91
minimal-budgets.json cli-spa-starter.gzip 38839 38908 +69
minimal-budgets.json root-static-specialized.raw 77009 77097 +88
minimal-budgets.json root-static-specialized.gzip 25568 25618 +50
minimal-budgets.json root-chained-jsx.raw 84335 84424 +89
minimal-budgets.json root-chained-jsx.gzip 27877 27942 +65
minimal-budgets.json root-static-local.raw 77012 77100 +88
minimal-budgets.json root-static-local.gzip 25555 25601 +46
minimal-budgets.json hooks-state.raw 89073 89157 +84
minimal-budgets.json hooks-state.gzip 29570 29631 +61
minimal-budgets.json prop-attributes.raw 95687 95771 +84
minimal-budgets.json prop-attributes.gzip 31727 31772 +45
minimal-budgets.json context.raw 109161 109246 +85
minimal-budgets.json context.gzip 36089 36145 +56
minimal-budgets.json hydrate-root.raw 173292 173388 +96
minimal-budgets.json hydrate-root.gzip 54948 55005 +57
minimal-budgets.json deferred-hydration.raw 236621 236736 +115
minimal-budgets.json deferred-hydration.gzip 74796 74869 +73
minimal-budgets.json suspense-transition.raw 165103 165193 +90
minimal-budgets.json suspense-transition.gzip 52990 53053 +63
minimal-budgets.json component-owned-effects.raw 81523 81612 +89
minimal-budgets.json component-owned-effects.gzip 26854 26905 +51
minimal-budgets.json binding-hooks.raw 87588 87675 +87
minimal-budgets.json binding-hooks.gzip 29323 29366 +43
minimal-budgets.json binding-mantine-hooks-vite.raw 96170 96254 +84
minimal-budgets.json binding-mantine-hooks-vite.gzip 31904 31937 +33
minimal-budgets.json binding-mantine-hooks-esbuild.raw 95773 95857 +84
minimal-budgets.json binding-mantine-hooks-esbuild.gzip 32046 32099 +53
minimal-budgets.json binding-usehooks-ts-vite.raw 96951 97035 +84
minimal-budgets.json binding-usehooks-ts-vite.gzip 32143 32178 +35
minimal-budgets.json binding-usehooks-ts-esbuild.raw 96539 96623 +84
minimal-budgets.json binding-usehooks-ts-esbuild.gzip 32283 32335 +52
app-budgets.json rows.framework.raw 117771 117856 +85
app-budgets.json rows.framework.gzip 38826 38889 +63
app-budgets.json rows.total.raw 125283 125368 +85
app-budgets.json rows.total.gzip 41388 41452 +64
app-budgets.json todo.framework.raw 135650 135735 +85
app-budgets.json todo.framework.gzip 43996 44030 +34
app-budgets.json todo.total.raw 140760 140845 +85
app-budgets.json todo.total.gzip 46473 46506 +33
app-budgets.json chat.framework.raw 133227 133312 +85
app-budgets.json chat.framework.gzip 43394 43458 +64
app-budgets.json chat.total.raw 139880 139965 +85
app-budgets.json chat.total.gzip 46372 46436 +64
app-budgets.json weather.framework.raw 150179 150264 +85
app-budgets.json weather.framework.gzip 48786 48838 +52
app-budgets.json weather.total.raw 176858 176943 +85
app-budgets.json weather.total.gzip 57829 57872 +43
app-budgets.json bindings.framework.raw 362921 363012 +91
app-budgets.json bindings.framework.gzip 118679 118730 +51
app-budgets.json bindings.total.raw 718842 718933 +91

Validation

  • node benchmarks/bundle-size/run-minimal.mjs --budgets and node benchmarks/bundle-size/run.mjs --budgets octane-tsrx octane-jsx pass on the fix branch with these budgets. Without them they fail by up to 83 raw bytes.
  • On main, every measurement stays below these budgets, because this only raises them.
  • pnpm format:check, pnpm typecheck, pnpm test: not run; only budget JSON changes.

Risk / follow-ups

  • Land this before or together with the fix PR, whose size check depends on it.

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
JSON-only CI threshold updates with no application or framework logic changes; main-branch bundles already sit below the new ceilings.

Overview
Raises 51 bundle-size ceilings in minimal-budgets.json and app-budgets.json so CI size checks can pass after framework growth from the urgent layout-effect / commit-callback update-priority fix (stacked follow-up), without touching runtime code.

minimal-budgets.json: bumps raw and gzip limits for many minimal fixtures (SPA starter, static roots, hooks/context/hydration/suspense scenarios, and several hook-binding bundles), typically by ~33–115 raw bytes per entry.

app-budgets.json: raises framework and total raw/gzip budgets for sample apps (rows, todo, chat, weather, bindings) by similar small amounts (~43–91 raw bytes). Brotli values are unchanged in the diff.

Budgets were regenerated with the benchmark --write-budgets flow; unrelated downward adjustments from main were intentionally omitted so this PR only increases limits.

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

Makes room for the commit-phase update priority fix in the useLayoutSnapshot
follow-up: 32 minimal-scenario and 19 application budgets grow by 84-115 raw
and 33-73 gzip bytes.

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

vercel Bot commented Oct 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
octane-website Skipped Skipped Oct 3, 2026 7:14pm UTC
octane-website-mcp Skipped Skipped Oct 3, 2026 7:14pm UTC

Request Review

@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 3, 2026
@trueadm
trueadm marked this pull request as ready for review October 3, 2026 19:14
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

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

Compares 12c32ece2, the merge commit's first parent with fd3283993 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 2.783 2.758 ±0.0% −0.0% … +3.2% ⚪ within noise
octane-tsrx replace 5.517 5.742 +0.9% −1.7% … +4.6% ⚪ within noise
octane-tsrx add 2.308 2.367 ±0.0% −0.0% … +4.3% ⚪ within noise
octane-tsrx update 0.125 0.120 −2.0% −3.4% … −1.1% ⚪ within noise
octane-tsrx select 0.005 0.005 +0.5% −0.5% … +1.6% ⚪ within noise
octane-tsrx swap 0.035 0.034 +2.3% +1.5% … +3.8% ⚪ within noise
octane-tsrx remove 0.016 0.016 ±0.0% −1.6% … +0.8% ⚪ within noise
octane-tsrx runlots 23.242 22.858 +1.5% −3.2% … +4.9% ⚪ within noise
octane-tsrx select_lots 0.005 0.005 −1.5% −2.3% … ±0.0% ⚪ within noise
octane-tsrx clear 45.708 44.050 −1.2% −3.7% … +2.0% ⚪ within noise
octane-jsx run 3.233 3.383 +2.9% +0.0% … +5.5% ⚪ within noise
octane-jsx replace 6.225 5.933 ±0.0% −4.2% … +1.6% ⚪ within noise
octane-jsx add 3.133 3.275 −1.5% −3.2% … +0.0% ⚪ within noise
octane-jsx update 0.239 0.239 +0.7% −0.7% … +1.8% ⚪ within noise
octane-jsx select 0.132 0.127 −3.5% −5.0% … −1.0% ⚪ within noise
octane-jsx swap 0.217 0.210 −1.7% −3.1% … −0.5% ⚪ within noise
octane-jsx remove 0.163 0.163 −1.8% −3.0% … +0.6% ⚪ within noise
octane-jsx runlots 26.850 26.475 −0.6% −3.3% … +1.9% ⚪ within noise
octane-jsx select_lots 1.337 1.379 −0.5% −2.1% … +2.6% ⚪ within noise
octane-jsx clear 42.708 43.225 +0.7% −1.6% … +2.6% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx bindings_js_gzip 240,407 240,396 −11 (−0.0%) 🟢
octane-tsrx bindings_js_brotli 204,738 204,641 −97 (−0.0%) 🟢
octane-tsrx bindings_app_gzip 121,728 121,717 −11 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 101,836 101,739 −97 (−0.1%) 🟢

50 other measured values are unchanged.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

@trueadm
trueadm merged commit 3992e23 into main Oct 3, 2026
55 checks passed
@trueadm
trueadm deleted the ci/layout-effect-priority-budgets branch October 3, 2026 19:29
trueadm added a commit that referenced this pull request Oct 3, 2026
Main gained #1685, which raised 51 budgets for the useLayoutSnapshot
commit-phase priority fix (#1686), and #1681/#1665. Re-measured on main
425a32a: each of #1663, #1664 and #1666 merged alone, and all three
plus #1686 merged together. Each budget is the larger of main's value and
the largest measured value plus 32 (raw/gzip) or 256 (brotli), so the
three perf PRs and #1686 can land in any order.

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

This branch was previously deployed

2 inactive deployments
Preview – octane-website — c8728d9c Deployed Oct 3, 2026 by vercel[bot]
Preview – octane-website-mcp — c8728d9c Deployed Oct 3, 2026 by vercel[bot]
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