Skip to content

ci(bench): raise byte budgets for skipping undo entries on fresh rows (#1831) - #1832

Merged
trueadm merged 1 commit into
mainfrom
ci/journal-fresh-rows-budget
Oct 6, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/journal-fresh-rows-budget

Conversation

@trueadm

@trueadm trueadm commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is the budget-only companion to #1831. It raises byte budgets only.

Merge order: merge it immediately before #1831, back to back. The downward ratchet fails every other open PR while main carries a raise its feature has not used.

What #1831 adds: it skips undo entries for handlers and class names written into rows the render creates, and checks a cleared list's old rows without a call per row. That adds a cached discard stamp, a foreign path for runtime writers, and an inlined nextSibling walk.

What it costs:

raw gzip
every scenario (stamp bookkeeping) +81
scenarios that reach list clears up to +199
all scenarios +37 to +119
rows framework 104,286 → 104,467 33,898 → 33,981
todo framework 115,017 → 115,198 36,820 → 36,901

What it buys: js-framework production calls −13.8% for create 1k and create 10k, and 10,097 → 97 for clear. Wall time is −5.6% for create 1k and −4.5% for create 10k.

Values are run.mjs --write-budgets octane-tsrx octane-jsx and run-minimal.mjs --write-budgets, measured with #1831 on main 4dcb699866 (+32; brotli +256). Only raises are kept, 70 values across app-budgets.json, minimal-budgets.json and jsx-budgets.json. Local brotli-only decreases are left as main has them.

Validation

  • node benchmarks/bundle-size/budget-raises.mjs --base origin/main --head HEAD: "70 raise(s) in a budget-only change"
  • pnpm format:check / pnpm typecheck / pnpm test (budget JSON only)

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 runtime, security, or application logic changes.

Overview
Raises bundle-size CI budgets across app-budgets.json, jsx-budgets.json, and minimal-budgets.json so the downward ratchet still passes after the runtime work in #1831 lands. The diff is budget-only: 70 raw/gzip ceilings go up (on the order of ~81–199 bytes raw and ~37–119 bytes gzip per affected scenario); brotli entries are unchanged except where main already had lower values.

App scenarios (rows, todo, chat, weather, bindings) get higher framework and total limits. Minimal gates (SPA starter, static roots, hooks, bindings, etc.) and the jsx aggregate framework/total budgets are bumped the same way. Intended merge order is immediately before #1831, back to back.

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

The companion journal-update-cost pull request skips undo entries for
handlers and class names written into rows the render creates, and checks a
cleared list's old rows without a call per row. It adds a cached discard
stamp that beginRootRender, endRootRender, preserveRootCreatedDom and
hydrateRoot keep current, a `foreign` path for runtime writers, and an
inlined nextSibling walk. That costs +81 raw in every scenario and up to
+199 raw where list clears are reachable, with gzip growing +37 to +119.
The win: create 1k -13.8% production calls and -5.6% wall time, create 10k
-13.8% calls and -4.5% wall time, clear 10,097 -> 97 calls.

Budgets are measured with that change on main 4dcb699 (+32; brotli
+256), raises only:
- rows framework 104,286 -> 104,467 raw, 33,898 -> 33,981 gzip
- todo framework 115,017 -> 115,198 raw, 36,820 -> 36,901 gzip
- every other changed app, jsx and minimal scenario likewise, by the
  measured delta

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

vercel Bot commented Oct 6, 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 6, 2026 9:02pm UTC
octane-website-mcp Skipped Skipped Oct 6, 2026 9:02pm 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 6, 2026
@github-actions
github-actions Bot marked this pull request as draft October 6, 2026 21:02
@trueadm
trueadm marked this pull request as ready for review October 6, 2026 21:02
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
octane-website 38c41f4 Commit Preview URL

Branch Preview URL
Oct 06 2026, 09:21 PM

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

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

Compares 4dcb69986, the merge commit's first parent with 0c3a7bbd4 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 4.067 4.267 +2.9% −5.5% … +13.0% ⚪ within noise
octane-tsrx replace 11.158 12.058 +1.8% −7.2% … +10.6% ⚪ within noise
octane-tsrx add 3.517 3.458 +2.9% −3.1% … +8.2% ⚪ within noise
octane-tsrx update 0.194 0.181 −3.9% −15.8% … +0.6% ⚪ within noise
octane-tsrx select 0.007 0.007 −0.8% −12.8% … +5.8% ⚪ within noise
octane-tsrx swap 0.051 0.051 −2.0% −12.3% … +13.7% ⚪ within noise
octane-tsrx remove 0.034 0.035 +1.0% −6.0% … +9.1% ⚪ within noise
octane-tsrx runlots 35.092 32.208 −7.4% −16.0% … +1.5% ⚪ within noise
octane-tsrx select_lots 0.007 0.007 −0.9% −8.8% … +6.5% ⚪ within noise
octane-tsrx clear 81.733 89.275 +6.9% −5.0% … +18.6% ⚪ within noise
octane-jsx run 4.983 4.908 −1.2% −7.9% … +5.6% ⚪ within noise
octane-jsx replace 14.850 14.275 −5.3% −11.7% … +9.0% ⚪ within noise
octane-jsx add 5.450 5.542 −9.2% −23.5% … +7.1% ⚪ within noise
octane-jsx update 0.481 0.498 +9.5% −1.4% … +24.2% ⚪ within noise
octane-jsx select 0.204 0.206 −0.4% −5.1% … +7.3% ⚪ within noise
octane-jsx swap 0.360 0.352 −2.7% −8.5% … +10.5% ⚪ within noise
octane-jsx remove 0.361 0.310 −10.6% −25.9% … −1.7% ⚪ within noise
octane-jsx runlots 49.667 50.200 +1.6% −10.9% … +9.1% ⚪ within noise
octane-jsx select_lots 3.558 3.046 −5.4% −12.8% … +11.1% ⚪ within noise
octane-jsx clear 87.300 92.058 +5.8% −5.1% … +14.9% ⚪ 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 105 measured values.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
octane-website-mcp 38c41f4 Commit Preview URL

Branch Preview URL
Oct 06 2026, 09:23 PM

@trueadm
trueadm merged commit e67e86f into main Oct 6, 2026
37 of 56 checks passed
@trueadm
trueadm deleted the ci/journal-fresh-rows-budget branch October 6, 2026 21:39
trueadm added a commit that referenced this pull request Oct 6, 2026
With #1832's raises on main, these measure below their budgets, and the
downward ratchet asks for:
- hydrate-root brotli 38,805 -> 38,747 (CI's own figure)
- component-owned-effects brotli 22,602 -> 22,600
- binding-usehooks-ts-esbuild brotli 27,494 -> 27,475
- bindings app gzip 115,705 -> 115,704

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 6, 2026
…es, and clear lists without a call per row (#1831)

* perf(octane): skip undo entries for writes into rows the render creates, and clear lists without a call per row

Every scheduled render opens the root undo journal. Abandoning the render
discards each Block it created whole (undoCreatedInRootRender), so an undo
entry for a write into such a Block's own hosts is never replayed.

- A module-level ROOT_DISCARD_STAMP holds the createdStamp of the Blocks the
  active root attempt discards, or -1 under hydration or once adopted DOM
  is retained. beginRootRender and endRootRender (via the frame),
  preserveRootCreatedDom and hydrateRoot's hydrating mark keep it current.
  journalBag now tests that one field instead of the transaction's shape.
- setEventHandler and setClassName skip their undo entry for a host of such
  a Block in the root window. Runtime callers that may write a host the
  current scope does not own pass `foreign`: signal-driven class writes,
  spread handlers, de-opt class and handler removal.
- The deferred owned-list clear checks its old rows through the native
  nextSibling getter instead of calling getNextSibling per row.

js-framework, exact production calls (octane-tsrx): create 1k
29,087 -> 25,087, replace 36,100 -> 32,100, append 37,086 -> 33,086, create
10k 290,084 -> 250,084, clear 10,097 -> 97. No operation gains a call or a
DOM mutation. Wall time: create 1k -5.6%, create 10k -4.5%, other operations
within noise. The byte growth (+181 raw / +83 gzip on rows) is raised in a
separate budget-only pull request.

Refs #1801.

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

* ci(bench): ratchet the budgets #1831 lowers

With #1832's raises on main, these measure below their budgets, and the
downward ratchet asks for:
- hydrate-root brotli 38,805 -> 38,747 (CI's own figure)
- component-owned-effects brotli 22,602 -> 22,600
- binding-usehooks-ts-esbuild brotli 27,494 -> 27,475
- bindings app gzip 115,705 -> 115,704

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 6, 2026
Budget-only raise for #1833, which deferred its raise until
#1831 landed because both raise the same budgets. #1832 covered #1831 alone,
so main 50e18cc fails test shard 1/4 at "Verify every bundle budget"
(cli-spa-starter raw 101,793 over 100,464).

#1833 keeps link records for keyed-list rollback (record forms plus the link
notes in each relinking reconcile path). Its own measurement: +1,359 raw /
+443 gzip on rows. Measured on main 50e18cc with
`run-minimal.mjs --write-budgets` and `run.mjs --write-budgets octane-tsrx
octane-jsx` (measured + 32 raw/gzip, + 256 brotli); 60 raises, no lowerings:
- every client scenario and app: about +1,355 raw, +415 to +475 gzip
- cli-spa-starter 100,464 -> 101,825 raw, 33,454 -> 33,883 gzip
- root-static 163,723 -> 165,078 raw; rows framework 104,467 -> 105,826 raw
- jsx framework 177,637 -> 178,994 raw
- brotli rises where the measurement passed the old value (+256 headroom)

Bisected per commit on cli-spa-starter: 4dcb699 100,347 raw, #1833
101,708, #1834 101,708, #1831 101,793.

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

This branch was previously deployed

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