Skip to content

perf(octane): skip journal entries for Blocks a root render discards with their parent - #1892

Merged
trueadm merged 8 commits into
mainfrom
fix/root-journal-nested-created
Oct 8, 2026
Merged

trueadm merged 8 commits into
mainfrom
fix/root-journal-nested-created

Conversation

@trueadm

@trueadm trueadm commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • A root render no longer records creation or render journal entries for a Block whose nearest real Block ancestor the same render created. Rollback discards that subtree with its creator anyway.
  • After replaying the root journal, a rollback now sweeps transaction.created and unmounts any Block it created that is still live. That covers Blocks the creator's teardown can no longer reach.
  • Three behavioral rollback tests pin the cases where a skip without that sweep, or without the depth guard, leaks DOM.

Why

Every scheduled root render opens an undo journal. createdInRootRender logged a 4-slot JOURNAL_CREATED entry, and renderBlockInner a 4-slot JOURNAL_RENDER entry, for every Block the attempt created. That included Blocks nested inside a parent the same attempt created, which rollback (undoCreatedInRootRender) discards together with that parent. On the 2,047-component recursive-context mount that is 8,202 entries and about 480 KB of allocation per mount.

The prototype was not rollback-equivalent

Skipping the entry when TRANSITION_JOURNAL_DEPTH === 1 && parent.createdStamp === ROOT_DISCARD_STAMP assumes the parent's teardown reaches every skipped child. Two realistic cases break that assumption:

  1. A child linked only after its render returns. portal() registers its slot after renderPortalState returns. A fresh portal whose content suspends is therefore unreachable, and rollback leaves its range markers and partial content in the target.
  2. A fresh parent that renders twice in one attempt and swaps an @if arm. journalRootSlot is not gated for created owners, so rollback restores state.block to the old, already-disposed arm. The new arm is then unreachable, and its Block, cleanups, signal owners, and portal DOM leak.

The sweep makes the set of Blocks disposed by a rollback identical to before. Every created Block is still pushed into transaction.created, and the skip requires the Block's own createdStamp to match, so a skipped Block is always in that list.

Rollback equivalence

  • Undo ordering: only entries logged between the creator's creation and the child's creation are now undone while the child is still mounted. Those entries predate the child, so they cannot reference it. A range restore that removes the child's DOM first leaves its later unmount a no-op on detached nodes. Final DOM is identical.
  • Nested boundary checkpoints: the skip requires TRANSITION_JOURNAL_DEPTH === 1. A boundary window replays only its own entries and has no sweep, so it keeps every entry. A Block skipped at depth 1 is never inside an open nested window.
  • retainedCreated and hydration: ROOT_DISCARD_STAMP is -1 in hydrating attempts and after the first retention, so nothing is skipped there. The skip test runs after createdInRootRender's own preserve check. Every later retention happens immediately after createBlock, before the Block has children. trackPresentationFrame retains ancestors late, but only ones created while hydrating, which were preserved and so never skipped.
  • Portals: a portal Block reached by its owner's teardown always self-detaches (the portalSlotSlot branch forces it). One its owner never registered is caught by the sweep, which detaches it. Its event-range and delegation registration is undone by the existing renderPortalState journal closure, which is still logged.
  • Hookless children: the creation-entry test walks past LiteBlockImpl stand-ins to their owning Block; lite scopes are registered on that owner's scope.children. The render-entry test checks only the direct parentBlock, so Blocks directly below a stand-in keep their render entries.
  • Render entries: the logged ancestor's own render entry invalidates the committed path above it. The skipped part of the path is discarded.
  • Observable difference: during a rollback, teardown callbacks of these never-committed nested scopes, such as nativeLocalHook disposers and signal-owner retirement, now run parent-first (ordinary deletion order) instead of in reverse creation order. Their effects never ran.

Changes

  • packages/octane/src/runtime.ts: an inline ancestor-stamp test that gates the JOURNAL_CREATED push in createdInRootRender and the JOURNAL_RENDER push in renderBlockInner, and the post-replay sweep in rollbackRootRender. The test is inline rather than a helper so the change adds no function calls; the js-framework work counters, which count every production call, match main exactly (40 of 40 values).
  • packages/octane/tests/root-rollback-nested-created.test.ts and fixture: a fresh portal whose content suspends, a fresh parent swapping its arm within one attempt, and a committed boundary holding a transition.
  • Changeset (patch).

Validation

  • Targeted tests: root-rollback-nested-created passes in octane and octane-prod. 35 neighbouring rollback, portal, suspense, transition, de-opt upgrade, warm-plan and hydration files pass in octane (618 tests).
  • Each new test was seen failing on a realistic broken version:
    • the prototype (skip, no sweep) fails the portal and arm-swap tests;
    • the candidate with the sweep removed fails the same two;
    • a skip without the depth guard fails all three.
  • pnpm test (left to CI)
  • pnpm typecheck:files and pnpm format:files:check on the changed files
  • perf-review: see below

Measurements

Paired runs, base and candidate interleaved per round with rotating order. Production builds of the octane-tsrx fixtures, headless Chromium, served cross-origin isolated for 5 µs timers. Each row has an A/A control (base against a second copy of base).

op candidate / base (paired median) A/A
portal-swarm mount_closed, cold 0.88 (IQR 0.86–0.90) 0.99
portal-swarm mount_closed, warm 0.977
portal-swarm open_close_cycle 1.00–1.02 1.00
portal-swarm open_all 1.01–1.02 1.005
recursive-context mount, cold 1.015 (IQR 0.99–1.04) 0.995
recursive-context mount, warm 0.986
recursive-context partial_remount 0.97

Allocation per op (CDP sampling heap profiler):

op before after change
recursive-context warm mount 4,028 KB 3,689 KB −8%
portal-swarm mount 1,124 KB 995 KB −12%
portal open/close cycle unchanged (the shorter log lands in the same array-capacity step)

A creation-only variant (render entries kept) measures 1.00 on portal cold mount, so that win comes from dropping the nested render entries. The prototype's reported 3–5% open/close gain did not reproduce. openAll opens @if arms under committed items, so only the tooltip and its portal are skipped: 800 of about 8,600 entries.

perf-review

Scan: node scripts/perf-review-scan.mjs → 0 candidates. js-framework work counters (pair.mjs --work-only against main): identical.
Hot paths touched: renderBlockInner (per Block render) and createdInRootRender (per Block creation inside a root render). The sweep runs once per root rollback.

# Severity Location Dimension Finding Required evidence Provided?
1 note runtime.ts createdInRootRender / renderBlockInner shapes The creation-side stand-in walk reads parentBlock on BlockImpl or LiteBlockImpl (both declare it) and createdStamp only on the BlockImpl it ends at. The render side reads parentBlock?.createdStamp, which is a 2-map load when the parent is a stand-in, and only for Blocks this render created. none n/a
2 note runtime.ts rollbackRootRender allocation The sweep is O(created) per rollback, with no allocation. none n/a
3 needs-evidence bundle size About +250 raw bytes in every runtime bundle (root-static 165,748 vs budget 165,531). Needs the budget-only raise in #1893, which must land first. CI bundle rows after raise

No compiled-output, DOM, or scheduling change.

Risk / follow-ups

  • Bundle budgets: this PR is over the byte budgets until ci(bundle-size): raise budgets for the root journal's nested-creation skip (#1892) #1893 lands. Per CONTRIBUTING, that raise lands alone and must merge immediately before this PR.
  • Slot journaling on @if toggles costs about 5% of a portal open/close cycle (journalRootSlot, mostly self time). Per toggle it allocates two undo closures, a spread clone of the slot state, a node array, and two Map entries. Typed journal entries for the structure release and the lease-free range restore would remove the closures. Not attempted here.
  • Pre-existing bug, not changed here: rolling back a root render that created a portal into a target another committed portal also uses decrements the target's delegation refcount twice. The journal closure unregisters it, and so does the slot teardown, so the committed portal's events stop dispatching. Reproduces on main.

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

Medium Risk
Changes core root-render rollback and suspense teardown paths; behavior is intended to stay equivalent via the post-replay sweep, but incorrect gating could leak DOM or skip needed undo entries.

Overview
Root render undo journals no longer record JOURNAL_CREATED or JOURNAL_RENDER for Blocks whose nearest real ancestor the same attempt also created—those subtrees are torn down with the parent on rollback anyway. Nested transition boundaries, hydration, and adopted DOM still log every entry.

Rollback now sweeps transaction.created after replaying the journal and unmounts any Block the attempt created that is still live, fixing leaks when a skipped Block was never linked (e.g. a portal that suspended before its slot registered, or an @if arm swapped mid-render).

Adds regression tests for those portal, arm-swap, and transition-held-boundary cases. Measured wins: ~8% less heap on a large recursive mount and ~13% faster cold portal-swarm mount; open/close on committed trees is unchanged.

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

trueadm and others added 2 commits October 8, 2026 13:41
…with their parent

A root render's undo journal recorded a creation entry and a render entry for
every Block it created, including Blocks nested inside a parent it also created,
which rollback discards with that parent. Skip both entries for such Blocks
(walking past hookless stand-ins to the owning Block) at the root window's depth,
and after replaying the journal sweep `created` for any Block the parent's undo
did not reach: a portal whose content suspended before its slot was registered,
or an arm a restored slot no longer names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent perf PR: performance work labels Oct 8, 2026
@domgan-oai
domgan-oai marked this pull request as ready for review October 8, 2026 12:47
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • ❌ bundle-size: 29 value(s) exceed their committed budget
  • ❌ bundle-reachability: 64 value(s) exceed their committed budget
  • 🔴 bundle-size: 18 value(s) increased within budget
  • 🔴 bundle-reachability: 10 value(s) increased within budget

Compares abe9b42a5, the merge commit's first parent with 4e9ce6dca 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 3.250 3.192 +3.3% +0.3% … +8.6% ⚪ within noise
octane-tsrx replace 8.700 8.058 −0.8% −10.0% … +5.3% ⚪ within noise
octane-tsrx add 2.858 2.992 ±0.0% −6.3% … +7.2% ⚪ within noise
octane-tsrx update 0.137 0.136 +2.1% −0.0% … +5.8% ⚪ within noise
octane-tsrx select 0.006 0.006 +1.6% −1.1% … +2.9% ⚪ within noise
octane-tsrx swap 0.034 0.034 +2.2% −2.9% … +7.7% ⚪ within noise
octane-tsrx remove 0.018 0.018 +2.4% −0.8% … +10.2% ⚪ within noise
octane-tsrx runlots 29.908 30.750 −1.0% −6.5% … +5.4% ⚪ within noise
octane-tsrx select_lots 0.007 0.007 +0.2% −2.0% … +1.2% ⚪ within noise
octane-tsrx clear 58.658 60.308 +5.7% −7.2% … +19.2% ⚪ within noise
octane-jsx run 4.067 3.750 −0.0% −6.8% … +4.2% ⚪ within noise
octane-jsx replace 10.017 9.125 −4.2% −10.4% … −1.0% ⚪ within noise
octane-jsx add 3.450 3.700 +3.9% −2.9% … +8.6% ⚪ within noise
octane-jsx update 0.292 0.305 −0.7% −1.8% … +1.5% ⚪ within noise
octane-jsx select 0.153 0.154 +4.6% −0.8% … +8.4% ⚪ within noise
octane-jsx swap 0.250 0.255 +1.6% −2.8% … +4.1% ⚪ within noise
octane-jsx remove 0.207 0.208 −3.3% −7.8% … +0.3% ⚪ within noise
octane-jsx runlots 30.092 31.392 +2.3% −4.1% … +6.6% ⚪ within noise
octane-jsx select_lots 1.650 1.650 −4.3% −6.9% … +2.6% ⚪ within noise
octane-jsx clear 51.508 53.025 +1.9% −3.8% … +5.3% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

❌ 29 value(s) exceed their committed budget. Reduce the growth, or raise the budget in a separate pull request that names the bytes and the reason (CONTRIBUTING.md, "Size budgets").

target metric head budget over
octane-tsrx fw_raw 106,486 106,239 +247
octane-tsrx fw_gzip 34,637 34,591 +46
octane-tsrx fw_brotli 30,715 30,708 +7
octane-tsrx js_raw 113,432 113,185 +247
octane-tsrx js_gzip 36,972 36,926 +46
octane-tsrx todo_fw_raw 117,221 116,974 +247
octane-tsrx todo_fw_gzip 37,545 37,501 +44
octane-tsrx todo_js_raw 121,839 121,592 +247
octane-tsrx todo_js_gzip 39,766 39,721 +45
octane-tsrx chat_fw_raw 114,823 114,576 +247
octane-tsrx chat_fw_gzip 36,875 36,791 +84
octane-tsrx chat_js_raw 120,588 120,341 +247
octane-tsrx chat_js_gzip 39,590 39,506 +84
octane-tsrx weather_fw_raw 134,988 134,741 +247
octane-tsrx weather_fw_gzip 43,111 43,069 +42
octane-tsrx weather_fw_brotli 37,853 37,819 +34
octane-tsrx weather_js_raw 157,142 156,895 +247
octane-tsrx weather_js_gzip 50,982 50,941 +41
octane-tsrx weather_js_brotli 44,511 44,466 +45
octane-tsrx bindings_fw_raw 341,499 339,858 +1,641
octane-tsrx bindings_fw_gzip 109,436 109,005 +431
octane-tsrx bindings_fw_brotli 95,079 94,788 +291
octane-tsrx bindings_js_raw 689,137 687,496 +1,641
octane-tsrx bindings_js_gzip 225,102 224,671 +431
octane-tsrx bindings_js_brotli 191,237 190,989 +248
octane-jsx fw_raw 179,764 179,517 +247
octane-jsx fw_gzip 56,758 56,724 +34
octane-jsx js_raw 188,029 187,782 +247
octane-jsx js_gzip 59,615 59,582 +33
target metric base head Δ
octane-tsrx js_raw 113,173 113,432 +259 (+0.2%) 🔴
octane-tsrx js_gzip 36,908 36,972 +64 (+0.2%) 🔴
octane-tsrx js_brotli 32,685 32,744 +59 (+0.2%) 🔴
octane-tsrx app_gzip 2,334 2,335 +1 (+0.0%) 🔴
octane-tsrx app_brotli 2,032 2,029 −3 (−0.1%) 🟢
octane-tsrx fw_raw 106,227 106,486 +259 (+0.2%) 🔴
octane-tsrx fw_gzip 34,574 34,637 +63 (+0.2%) 🔴
octane-tsrx fw_brotli 30,653 30,715 +62 (+0.2%) 🔴
octane-tsrx todo_js_raw 121,580 121,839 +259 (+0.2%) 🔴
octane-tsrx todo_js_gzip 39,704 39,766 +62 (+0.2%) 🔴
octane-tsrx todo_js_brotli 34,956 35,013 +57 (+0.2%) 🔴
octane-tsrx todo_app_gzip 2,219 2,221 +2 (+0.1%) 🔴
octane-tsrx todo_app_brotli 1,879 1,884 +5 (+0.3%) 🔴
octane-tsrx todo_fw_raw 116,962 117,221 +259 (+0.2%) 🔴
octane-tsrx todo_fw_gzip 37,485 37,545 +60 (+0.2%) 🔴
octane-tsrx todo_fw_brotli 33,077 33,129 +52 (+0.2%) 🔴
octane-tsrx chat_js_raw 120,329 120,588 +259 (+0.2%) 🔴
octane-tsrx chat_js_gzip 39,522 39,590 +68 (+0.2%) 🔴
octane-tsrx chat_js_brotli 34,879 34,916 +37 (+0.1%) 🔴
octane-tsrx chat_app_brotli 2,388 2,387 −1 (−0.0%) 🟢
octane-tsrx chat_fw_raw 114,564 114,823 +259 (+0.2%) 🔴
octane-tsrx chat_fw_gzip 36,807 36,875 +68 (+0.2%) 🔴
octane-tsrx chat_fw_brotli 32,491 32,529 +38 (+0.1%) 🔴
octane-tsrx weather_js_raw 156,883 157,142 +259 (+0.2%) 🔴
octane-tsrx weather_js_gzip 50,924 50,982 +58 (+0.1%) 🔴
octane-tsrx weather_js_brotli 44,467 44,511 +44 (+0.1%) 🔴
octane-tsrx weather_app_gzip 7,873 7,871 −2 (−0.0%) 🟢
octane-tsrx weather_app_brotli 6,675 6,658 −17 (−0.3%) 🟢
octane-tsrx weather_fw_raw 134,729 134,988 +259 (+0.2%) 🔴
octane-tsrx weather_fw_gzip 43,051 43,111 +60 (+0.1%) 🔴
octane-tsrx weather_fw_brotli 37,792 37,853 +61 (+0.2%) 🔴
octane-tsrx bindings_js_raw 688,878 689,137 +259 (+0.0%) 🔴
octane-tsrx bindings_js_gzip 225,032 225,102 +70 (+0.0%) 🔴
octane-tsrx bindings_js_brotli 191,233 191,237 +4 (+0.0%) 🔴
octane-tsrx bindings_app_gzip 115,665 115,666 +1 (+0.0%) 🔴
octane-tsrx bindings_app_brotli 96,235 96,158 −77 (−0.1%) 🟢
octane-tsrx bindings_fw_raw 341,240 341,499 +259 (+0.1%) 🔴
octane-tsrx bindings_fw_gzip 109,367 109,436 +69 (+0.1%) 🔴
octane-tsrx bindings_fw_brotli 94,998 95,079 +81 (+0.1%) 🔴
octane-tsrx full_fw_raw 568,708 568,967 +259 (+0.0%) 🔴
octane-tsrx full_fw_gzip 171,256 171,328 +72 (+0.0%) 🔴
octane-tsrx full_fw_brotli 143,986 144,063 +77 (+0.1%) 🔴
octane-jsx js_raw 187,770 188,029 +259 (+0.1%) 🔴
octane-jsx js_gzip 59,562 59,615 +53 (+0.1%) 🔴
octane-jsx js_brotli 51,752 51,863 +111 (+0.2%) 🔴
octane-jsx app_brotli 2,404 2,412 +8 (+0.3%) 🔴
octane-jsx fw_raw 179,505 179,764 +259 (+0.1%) 🔴
octane-jsx fw_gzip 56,705 56,758 +53 (+0.1%) 🔴
octane-jsx fw_brotli 49,348 49,451 +103 (+0.2%) 🔴
octane-jsx full_fw_raw 568,708 568,967 +259 (+0.0%) 🔴
octane-jsx full_fw_gzip 171,256 171,328 +72 (+0.0%) 🔴
octane-jsx full_fw_brotli 143,986 144,063 +77 (+0.1%) 🔴

8 other measured values are unchanged.

Public-import reachability bundles (bytes)

❌ 64 value(s) exceed their committed budget. Reduce the growth, or raise the budget in a separate pull request that names the bytes and the reason (CONTRIBUTING.md, "Size budgets").

target metric head budget over
cli-spa-starter raw 102,480 102,235 +245
cli-spa-starter gzip 34,092 34,041 +51
cli-spa-starter brotli 30,062 29,988 +74
root-static-specialized raw 72,993 72,746 +247
root-static-specialized gzip 23,929 23,867 +62
root-chained-jsx raw 74,870 74,624 +246
root-chained-jsx gzip 24,423 24,370 +53
root-static raw 165,846 165,598 +248
root-static gzip 52,363 52,313 +50
root-static-local raw 72,992 72,745 +247
root-static-local gzip 23,912 23,849 +63
root-static-local brotli 21,380 21,377 +3
root-callback-local raw 74,896 74,650 +246
root-callback-local gzip 24,428 24,377 +51
hooks-state raw 84,714 84,467 +247
hooks-state gzip 27,867 27,822 +45
prop-attributes raw 84,968 84,721 +247
prop-attributes gzip 27,857 27,827 +30
context raw 96,921 96,674 +247
context gzip 31,566 31,530 +36
context brotli 28,039 28,038 +1
hydrate-root raw 138,368 138,121 +247
hydrate-root gzip 44,271 44,196 +75
deferred-hydration raw 221,658 221,418 +240
deferred-hydration gzip 69,807 69,753 +54
deferred-hydration brotli 60,223 60,183 +40
hydrate-frame raw 366,363 365,796 +567
hydrate-frame gzip 113,602 113,469 +133
suspense-transition raw 141,850 140,222 +1,628
suspense-transition gzip 44,833 44,401 +432
suspense-transition brotli 39,330 39,132 +198
component-owned-effects raw 77,355 77,109 +246
component-owned-effects gzip 25,248 25,206 +42
binding-hooks raw 83,213 82,967 +246
binding-hooks gzip 27,512 27,471 +41
binding-hooks brotli 24,582 24,555 +27
binding-base-ui-vite raw 200,049 198,414 +1,635
binding-base-ui-vite gzip 62,845 62,427 +418
binding-base-ui-vite brotli 54,627 54,383 +244
binding-base-ui-esbuild raw 215,574 213,931 +1,643
binding-base-ui-esbuild gzip 69,797 69,369 +428
binding-base-ui-esbuild brotli 60,632 60,247 +385
binding-radix-vite raw 202,084 200,448 +1,636
binding-radix-vite gzip 63,446 63,043 +403
binding-radix-vite brotli 55,154 54,923 +231
binding-radix-esbuild raw 217,398 215,755 +1,643
binding-radix-esbuild gzip 70,372 69,893 +479
binding-radix-esbuild brotli 61,176 60,813 +363
binding-mantine-hooks-vite raw 86,771 86,524 +247
binding-mantine-hooks-vite gzip 28,465 28,396 +69
binding-mantine-hooks-esbuild raw 91,144 90,897 +247
binding-mantine-hooks-esbuild gzip 30,608 30,555 +53
binding-apollo-client-vite raw 342,501 340,859 +1,642
binding-apollo-client-vite gzip 105,134 104,741 +393
binding-apollo-client-vite brotli 91,771 91,544 +227
binding-apollo-client-esbuild raw 365,717 364,070 +1,647
binding-apollo-client-esbuild gzip 116,137 115,728 +409
binding-apollo-client-esbuild brotli 101,248 101,084 +164
binding-usehooks-ts-vite raw 87,541 87,294 +247
binding-usehooks-ts-vite gzip 28,698 28,660 +38
binding-usehooks-ts-vite brotli 25,612 25,593 +19
binding-usehooks-ts-esbuild raw 91,912 91,663 +249
binding-usehooks-ts-esbuild gzip 30,850 30,794 +56
binding-usehooks-ts-esbuild brotli 27,528 27,475 +53
target metric base head Δ
cli-spa-starter raw 102,223 102,480 +257 (+0.3%) 🔴
cli-spa-starter gzip 34,024 34,092 +68 (+0.2%) 🔴
cli-spa-starter brotli 29,963 30,062 +99 (+0.3%) 🔴
root-static-specialized raw 72,734 72,993 +259 (+0.4%) 🔴
root-static-specialized gzip 23,853 23,929 +76 (+0.3%) 🔴
root-static-specialized brotli 21,303 21,374 +71 (+0.3%) 🔴
root-chained-jsx raw 74,612 74,870 +258 (+0.3%) 🔴
root-chained-jsx gzip 24,354 24,423 +69 (+0.3%) 🔴
root-chained-jsx brotli 21,762 21,817 +55 (+0.3%) 🔴
root-static raw 165,587 165,846 +259 (+0.2%) 🔴
root-static gzip 52,300 52,363 +63 (+0.1%) 🔴
root-static brotli 45,596 45,537 −59 (−0.1%) 🟢
root-static-local raw 72,733 72,992 +259 (+0.4%) 🔴
root-static-local gzip 23,839 23,912 +73 (+0.3%) 🔴
root-static-local brotli 21,299 21,380 +81 (+0.4%) 🔴
root-callback-local raw 74,638 74,896 +258 (+0.3%) 🔴
root-callback-local gzip 24,358 24,428 +70 (+0.3%) 🔴
root-callback-local brotli 21,772 21,829 +57 (+0.3%) 🔴
hooks-state raw 84,455 84,714 +259 (+0.3%) 🔴
hooks-state gzip 27,811 27,867 +56 (+0.2%) 🔴
hooks-state brotli 24,764 24,802 +38 (+0.2%) 🔴
prop-attributes raw 84,709 84,968 +259 (+0.3%) 🔴
prop-attributes gzip 27,809 27,857 +48 (+0.2%) 🔴
prop-attributes brotli 24,805 24,852 +47 (+0.2%) 🔴
context raw 96,662 96,921 +259 (+0.3%) 🔴
context gzip 31,508 31,566 +58 (+0.2%) 🔴
context brotli 27,922 28,039 +117 (+0.4%) 🔴
hydrate-root raw 138,109 138,368 +259 (+0.2%) 🔴
hydrate-root gzip 44,219 44,271 +52 (+0.1%) 🔴
hydrate-root brotli 38,634 38,724 +90 (+0.2%) 🔴
deferred-hydration raw 221,406 221,658 +252 (+0.1%) 🔴
deferred-hydration gzip 69,735 69,807 +72 (+0.1%) 🔴
deferred-hydration brotli 60,119 60,223 +104 (+0.2%) 🔴
hydrate-frame raw 366,104 366,363 +259 (+0.1%) 🔴
hydrate-frame gzip 113,537 113,602 +65 (+0.1%) 🔴
hydrate-frame brotli 97,070 97,091 +21 (+0.0%) 🔴
suspense-transition raw 141,591 141,850 +259 (+0.2%) 🔴
suspense-transition gzip 44,768 44,833 +65 (+0.1%) 🔴
suspense-transition brotli 39,293 39,330 +37 (+0.1%) 🔴
component-owned-effects raw 77,097 77,355 +258 (+0.3%) 🔴
component-owned-effects gzip 25,196 25,248 +52 (+0.2%) 🔴
component-owned-effects brotli 22,496 22,600 +104 (+0.5%) 🔴
binding-hooks raw 82,955 83,213 +258 (+0.3%) 🔴
binding-hooks gzip 27,453 27,512 +59 (+0.2%) 🔴
binding-hooks brotli 24,533 24,582 +49 (+0.2%) 🔴
binding-base-ui-vite raw 199,790 200,049 +259 (+0.1%) 🔴
binding-base-ui-vite gzip 62,781 62,845 +64 (+0.1%) 🔴
binding-base-ui-vite brotli 54,502 54,627 +125 (+0.2%) 🔴
binding-base-ui-esbuild raw 215,315 215,574 +259 (+0.1%) 🔴
binding-base-ui-esbuild gzip 69,747 69,797 +50 (+0.1%) 🔴
binding-base-ui-esbuild brotli 60,479 60,632 +153 (+0.3%) 🔴
binding-radix-vite raw 201,825 202,084 +259 (+0.1%) 🔴
binding-radix-vite gzip 63,366 63,446 +80 (+0.1%) 🔴
binding-radix-vite brotli 55,095 55,154 +59 (+0.1%) 🔴
binding-radix-esbuild raw 217,139 217,398 +259 (+0.1%) 🔴
binding-radix-esbuild gzip 70,298 70,372 +74 (+0.1%) 🔴
binding-radix-esbuild brotli 61,053 61,176 +123 (+0.2%) 🔴
binding-mantine-hooks-vite raw 86,512 86,771 +259 (+0.3%) 🔴
binding-mantine-hooks-vite gzip 28,398 28,465 +67 (+0.2%) 🔴
binding-mantine-hooks-vite brotli 25,296 25,365 +69 (+0.3%) 🔴
binding-mantine-hooks-esbuild raw 90,885 91,144 +259 (+0.3%) 🔴
binding-mantine-hooks-esbuild gzip 30,543 30,608 +65 (+0.2%) 🔴
binding-mantine-hooks-esbuild brotli 27,233 27,244 +11 (+0.0%) 🔴
binding-apollo-client-vite raw 342,242 342,501 +259 (+0.1%) 🔴
binding-apollo-client-vite gzip 105,073 105,134 +61 (+0.1%) 🔴
binding-apollo-client-vite brotli 91,665 91,771 +106 (+0.1%) 🔴
binding-apollo-client-esbuild raw 365,458 365,717 +259 (+0.1%) 🔴
binding-apollo-client-esbuild gzip 116,087 116,137 +50 (+0.0%) 🔴
binding-apollo-client-esbuild brotli 101,330 101,248 −82 (−0.1%) 🟢
binding-usehooks-ts-vite raw 87,282 87,541 +259 (+0.3%) 🔴
binding-usehooks-ts-vite gzip 28,640 28,698 +58 (+0.2%) 🔴
binding-usehooks-ts-vite brotli 25,505 25,612 +107 (+0.4%) 🔴
binding-usehooks-ts-esbuild raw 91,653 91,912 +259 (+0.3%) 🔴
binding-usehooks-ts-esbuild gzip 30,786 30,850 +64 (+0.2%) 🔴
binding-usehooks-ts-esbuild brotli 27,421 27,528 +107 (+0.4%) 🔴

36 other measured values are unchanged.

trueadm and others added 4 commits October 8, 2026 14:06
…alls

The js-framework work counters count every production function call, and the
`discardedWithParent` helper added one per created or rendered Block. Test the
parent's stamp inline in createdInRootRender and renderBlockInner instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The inlined stand-in walk at the render-entry site cost 72 raw bytes. A Block
whose direct parentBlock this root render created can skip its render entry,
because that parent's entries invalidate the committed path; Blocks below a
hookless stand-in keep theirs. The creation entry keeps the stand-in walk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 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 4ec3ab2 Commit Preview URL

Branch Preview URL
Oct 08 2026, 02:22 PM

@cloudflare-workers-and-pages

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 4ec3ab2 Commit Preview URL

Branch Preview URL
Oct 08 2026, 02:25 PM

trueadm added a commit that referenced this pull request Oct 8, 2026
trueadm added a commit that referenced this pull request Oct 8, 2026
The merge took main's budget files (6eef1e0). Each raw and gzip row that
main fits drops by exactly what this change saves against main, measured per
scenario on both trees. Brotli rows keep main's values unless the ratchet asks
for less. That gives 37 lowers and no raises. The rows #1893 raised for #1892
keep #1892's growth. The 30 rows main exceeds until #1887 lands keep main's
values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
…udgets

#1888 (the split transition cue) merged ahead of its budget-only raise #1887,
so main's transition-using rows exceed their ceilings. #1893 has since raised
budgets for #1892, which is still open, but measured without #1888's growth.

Raise only the 30 rows still over their ceilings on main 1e74902, to
measured + 32 raw/gzip (+ 256 brotli) from run-minimal.mjs and run.mjs
--write-budgets, and keep every other value, including #1893's pending raises:
- suspense-transition, Base UI, Radix and Apollo bindings, bindings app:
  about +1.12 to +1.15 kB raw, +0.30 to +0.37 kB gzip
- hydrate-frame +63 raw / +37 gzip; root-static brotli +279

The 62 rows #1893 raised stay above their ratchet floor until #1892 lands.
This supersedes #1887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
The merge took main's budget files. Main now fits every row. Each raw and gzip
row drops by exactly what this change saves against main, measured per scenario
on both trees. Brotli rows keep main's values unless the ratchet asks for less.
That gives 63 lowers and no raises. The rows #1893 raised for #1892 keep
#1892's growth.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit 78750a0 into main Oct 8, 2026
27 of 30 checks passed
@trueadm
trueadm deleted the fix/root-journal-nested-created branch October 8, 2026 15:05
trueadm added a commit that referenced this pull request Oct 8, 2026
#1892 (78750a0) landed right after e14fbdf ratcheted main's budgets to
main's measured bytes, so its root-journal growth is over the ceilings.
Rewrite every budget with run-minimal.mjs and run.mjs --write-budgets on
78750a0 (measured + 32 raw/gzip, + 256 brotli): 77 raises, 2 lowerings,
budget files only. Main passes the ceilings and the ratchet as it stands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
The merge took main's budget files (68aa481), which match main's measured
bytes. Each raw and gzip row drops by exactly what this change saves against
main, measured per scenario on both trees. Brotli rows keep main's values
unless the ratchet asks for less. That gives 54 lowers and no raises.

Locally, binding-mantine-hooks-esbuild brotli is 7 bytes over main's value,
27,265 against 27,258. Its raw and gzip bytes equal main's: esbuild assigns
different minified names in that bundle, and brotli compresses them
differently.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
… a row (#1890)

* perf(octane): copy a keyed reorder's record directly until it relinks a row

A keyed reorder records its list at the first row index it rewrites, before it
knows whether it will relink a few rows or every row. Since #1833 that record
allocated its `links` Map and a per-journal records Map up front. When the
reorder then reached the LIS path, `fullForSlotRecord` walked the chain through
the empty links Map and, for a key Map already out of chain order, built a Set
of every row to filter it.

The record now gets its links Map at its first relink (`forSlotLinks`). Until
then only index writes have run, which change neither the chain nor the key
Map, so converting it copies the list as it stands, which is the full form's
cost before #1833. The record rides in the spare slot of its own undo entry,
found again through the window's `seen` index, so `SLOT_RECORDS` is gone and the
record still lives exactly as long as its log.

- recursive-context zero-context reorder: 4 Map constructions -> 2, so
  context-cache-work.mjs passes its ceiling again (bisected to e595a13).
- js-framework reorder matrix (octane-tsrx, paired, 12 samples): rotatef,
  rotateb and displace3-8 are 22-27% faster than main and within 5% of the
  runtime before #1833; removals and inserts keep #1833's gains.
- Framework bundles are 129-137 raw bytes smaller; budgets lowered.

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

* perf(octane): look a keyed list's record up only when its window has an entry

The PR bench counted two more production calls on every js-framework
operation: journalForSlot and journalForOwnedListClear called the record
lookup, and fullForSlotRecord with no record, even for a list's first record in
a render, where there is no entry to find. Skip both when the list has no
entry. Every js-framework calls_* and dom_* counter now equals main's
(pair.mjs --work-only).

Lower the bindings app and total brotli budgets the ratchet now asks for.

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

* perf(octane): read a keyed list's record from its undo entry inline

Inline the record lookup in journalForSlot and journalForOwnedListClear. With
the helper, the bindings app's framework chunk compressed 21 gzip bytes larger
than main's, past its budget, although raw was 104 bytes smaller. Inline, it is
5 gzip bytes larger and 10 under the budget. Production calls are unchanged:
every js-framework calls_* and dom_* counter equals main's (pair.mjs
--work-only against c0192ec).

Re-measure the bundle budgets on current main. The merges took main's budget
files, and this writes 40 lowers and no raises.

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

* ci(bench): lower the budgets by this change's measured saving over #1891

The merge took main's budget files. #1891 raised 70 rows ahead of #1875,
which is still open. Each raw and gzip row now drops by exactly what this change
saves against main (2f81266), measured per scenario on both trees. A row
#1891 raised therefore keeps #1875's headroom. Brotli rows keep main's values,
and no value is raised.

Every head measurement fits its budget. The ratchet flags only the 70 rows
#1891 raised for #1875, as it does for any PR until #1875 lands.

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

* ci(bench): re-lower the budgets this change saves on after #1875 landed

The merge took main's budget files. Each raw and gzip row that main
(abe9b42) fits drops by exactly what this change saves against main,
measured per scenario on both trees. Brotli rows keep main's values unless the
ratchet asks for less. That gives 24 lowers and no raises.

Main measures over 35 rows after #1875 and #1888, and #1887 budgets that
growth. Those rows keep main's values here. Merging #1887 will re-lower the
ones this change also saves on.

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

* ci(bench): re-lower the budgets this change saves on over #1893

The merge took main's budget files (6eef1e0). Each raw and gzip row that
main fits drops by exactly what this change saves against main, measured per
scenario on both trees. Brotli rows keep main's values unless the ratchet asks
for less. That gives 37 lowers and no raises. The rows #1893 raised for #1892
keep #1892's growth. The 30 rows main exceeds until #1887 lands keep main's
values.

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

* ci(bench): re-lower the budgets this change saves on over 87d9f95

The merge took main's budget files. Main now fits every row. Each raw and gzip
row drops by exactly what this change saves against main, measured per scenario
on both trees. Brotli rows keep main's values unless the ratchet asks for less.
That gives 63 lowers and no raises. The rows #1893 raised for #1892 keep
#1892's growth.

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

* ci(bench): lower the budgets by this change's saving over main's ratchet

The merge took main's budget files. e14fbdf set every budget to main's
measured bytes plus headroom. Each raw and gzip row drops by exactly what this
change saves against main, measured per scenario on both trees. Brotli rows
keep main's values unless the ratchet asks for less. That gives 56 lowers and
no raises. Every ceiling and the ratchet hold locally, and so do the
budget-raise and hydration-free checks.

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

* ci(bench): lower the budgets by this change's saving after #1892

The merge took main's budget files (68aa481), which match main's measured
bytes. Each raw and gzip row drops by exactly what this change saves against
main, measured per scenario on both trees. Brotli rows keep main's values
unless the ratchet asks for less. That gives 54 lowers and no raises.

Locally, binding-mantine-hooks-esbuild brotli is 7 bytes over main's value,
27,265 against 27,258. Its raw and gzip bytes equal main's: esbuild assigns
different minified names in that bundle, and brotli compresses them
differently.

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: domgan-oai <[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 perf PR: performance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant