Skip to content

perf(octane): ship render rollback and suspension only with entries that can drop a render - #2256

Merged
trueadm merged 4 commits into
mainfrom
perf/render-rollback-capability
Oct 28, 2026
Merged

trueadm merged 4 commits into
mainfrom
perf/render-rollback-capability

Conversation

@trueadm

@trueadm trueadm commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Render rollback (the root render undo journal and its replay) and suspension are now a capability that only the entries able to drop a render install. An application with none of them neither ships nor runs either.
  • Bundle rows (run.mjs, gzip): js-framework octane-tsrx 28,883 → 26,357 (−8.7%), octane-jsx 53,287 → 50,191; chat-stream 33,135 → 30,495 (−8.0%); todomvc −2,665; weather −2,728; bindings app −3,517; threadline (oxc) −2,719. run-minimal: every journal-free scenario −1.2 to −3.1 kB gzip (hooks-state 21,101 → 19,566; cli-spa-starter 27,083 → 24,734).
  • Apps that keep a feature able to drop a render grow by 96–327 B gzip (hydrate-root +146, signal-counter +98, shell +96 to +217, wayfinder +327). esbuild builds, which never fold a flag, grow 79–188 B. suspense-transition grows +13.9 kB only because its fixture now renders a keyed list, so that the control retains the list journal.
  • A new source-map reachability check (not a byte budget) holds js-framework, chat-stream and a new executed render-errors client to retaining none of the rollback declarations. The suspense-transition control must retain every one.

Why

Every root render opened a transaction and recorded an undo journal (journalUndo, journalBag, journalObjectOnce, journalForSlot, …) so it could be rolled back. bagDone and the commit loop passed careful whenever a journal was open, so every render took the careful path. But only some features can drop a render: suspension, a hydration attempt, native-read validation, and a ViewTransition hold. In an app without them a render either commits or goes with its root's teardown, and nothing needs undoing.

Changes

Capability. The journal state (TRANSITION_JOURNAL*, OPS_CHECKPOINT, ROOT_RENDER_ROLLBACK) moves from render.ts/engine.ts into drivers.ts, above every reader, with its only writers there: enterRootJournal/exitRootJournal (frames), openJournalWindow/closeJournalWindow (nested boundary windows), and markRootRenderRollback. ROOT_ROLLBACK is a boolean that installRootRollback() sets. Without an installer nothing assigns any of it, so oxc folds every guard. The rule measured in the real bundle: a never-assigned slot folds only in truthiness tests. !== null, > 1 and === 1 reads keep their code, so every TRANSITION_JOURNAL !== null guard becomes a truthiness test, and depth reads sit behind one.

Who installs it.

Can drop a render Installs When
use, compiled useBatch, Suspense, @try (tryBlock), Hydrate, ViewTransition, renderer regions each public binding: /* @__PURE__ */ rollbackEntry(impl) in its own module module load, before the first render
lazy the lazy() factory its call, at module scope
hydration attempts installHydrationDriver hydrateRoot / hydration start
native-read capture validation ensureNativeReadDriver the compiler's module-level enableNativeReadCollection
ViewTransition holds ensureViewTransitionDriver __vtSeen module hint

Each rendering entry's public binding is a pure-annotated rollbackEntry(impl) call in its own module, so a bundle keeps the call, and installs the rollback as the module loads, exactly when it keeps the entry. Internal callers use the implementation (tryBlockImpl, useImpl), so the runtime's own boundaries don't install it. A call-time install inside use() would be too late: the first use() in an update render would find earlier writes unjournaled. The flag lives in src/rollback-flag.ts, a leaf module like hydration-flag.ts, so a load-time write never reaches it uninitialized, whatever module order a bundler uses.

The generic cases, decided per case.

  • Uncaught render error (no boundary): React 19 unmounts the root, so rollbackRootRender without the journal only discards. It marks the render aborted, drops its ops and hook folds, unmounts what it created, and discards its capture.
  • Failed synchronous root replacement: the journal used to restore the previous root before unmounting it. Without the journal it is unmounted directly, so both screens still go.
  • root.unmount() during a render, and a disposed owner: the root is torn down. Discard.
  • Stale generation in the commit loop (root.render from a commit callback): it never rolled back; the remaining ops are dropped as before.
  • Error boundaries: switchToCatch/switchErrorToCatch drop the body's ops and unmount it, so ErrorBoundary needs no journal. A frontier flip's local unwind is journal-only: without a journal, the boundary that catches the error, or its root, tears the Block down.
  • Transitions, actions, optimistic updates: these drop a render only when it suspends into a hold, so they rely on the suspension installers.

Suspension. handleRenderError's suspense branch, the thrown-thenable conversion in renderBlockInner, the renderable-hole and Children thenable unwraps, the list-row warm retention and the retry-owner producers all read ROOT_ROLLBACK.

Fixes the split surfaced. The keyed-list clear path and beginDetachedBoundaryRender read TRANSITION_JOURNAL_BAGS! in every root render. They now test the journal first, and the leaf journal writers guard themselves.

Divergence (documented in docs/differences-from-react.md)

In a bundle that keeps no entry that can suspend, a thenable thrown during render or rendered as a child is an ordinary render error. The nearest error boundary catches it, or the root unmounts. React suspends on it. Libraries in the ecosystem throw raw promises only when React.use is missing, and Octane's bindings get use.

Validation

  • pnpm format:check — CI
  • pnpm typecheck — CI; pnpm typecheck:files over every changed runtime file passes locally
  • pnpm test — CI (local runs are limited to targeted files on this shared machine); 13 rollback/suspense/transition files, 342 tests pass in --project octane
  • node benchmarks/bundle-size/run-minimal.mjs and run.mjs octane-tsrx octane-jsx: pass, base and head
  • render-errors executed in jsdom gives the same snapshot with the journal installed (control build importing use). Breaking the list-clear guard fails the gate; breaking the replacement unmount fails the snapshot.
  • node scripts/split-runtime.mjs check: 0 violations
  • perf-review: node scripts/perf-review-scan.mjs → no candidates. Hot paths touched: beginRootRender/endRootRender (per root frame), bagRecord/bagDone, slotNext/listNext, reconcileKeyed/updateSurvivor, renderBlockInner, and the evt* handler bundles (per render or bag). Every new check is one truthiness read of a drivers.ts slot, which folds away without the journal. With the journal, a few journal guards now read the slot once more. No hot-record fields were added: RootRenderFrame loses six fields (the journal keeps its own frame stack), and RootRenderTransaction keeps its fields, with log/bags allocated by the first journaled frame. BlockImpl is untouched. No new allocation, scheduling hop or DOM work.
  • Same-session alternating A/B against base d44d6d9 (separate install per tree):
    • js-framework pair.mjs, 30 pairs: work counters 26 equal, 14 lower (−1/−2 calls per op), none higher; DOM mutations equal. Timing head/base: tsrx update 0.936, select 0.973, swap 0.993, remove 0.978, select_lots 0.969, others 1.000; jsx update 0.928, select 0.900, swap 0.923, remove 0.936, select_lots 0.913, others 0.98–1.0.
    • dbmon (octane-tsrx, octane-jsx; 6 alternating runs × 30 iterations): geomean 0.999, every op median 0.979–1.026.
    • app-frame-hydration --base (installs the journal through hydration and native reads; esbuild-minified, so both trees run all their code): work identical (1,653 Blocks, renders and renderBlock entries), client +179 B gzip. 20 pairs: every cold, longest-task and busy row has its interval inside ±3% (frame cold 1.007, live-sections 1.010, plain 1.000, boundaries 0.996). Warm: frame 1.017 [0.998–1.052], plain 1.000, boundaries 1.002. frame-live-sections warm reproduces at 1.035 [1.012–1.054] at 40 pairs, while frame warm reads 1.000 [0.982–1.018] at 40. A CDP profile of 120 warm live-sections hydrations per tree shows no hotspot (self time 3,488 ms head vs 3,543 ms base), and repeated minified passes average +0.9% with mixed signs. Not slower by the ±3% rule, but reported under risk.
  • concise-code: runtime +513 −381, mostly import moves and the mechanical guard conversion. New files: src/rollback-flag.ts (the flag; a leaf module, so entries can set it at load under any bundler), and benchmarks/bundle-size/render-rollback-gates.mjs with the render-errors fixture (the gate). Alternatives weighed: (1) call-time install inside use() and boundary creation: smaller, but the first use() in an update render would leave earlier writes unjournaled, so a static install was needed. (2) A compiler-emitted module installer: misses plain .ts callers of use. (2b) A separate entries module re-exported from runtime.ts: the joined single-file runtime harness bundled the runtime twice through it. (3) A separate abortRootRender: it cost every journaled app 235 B raw, so the discard lives in rollbackRootRender behind the driver test. Bytes: see Summary; journaled apps +95 to +180 B gzip.

Risk / follow-ups

  • use(Context)-only apps and catch-only @try directives install rollback: use and tryBlock are aliased whole. The compiler could route use(Context) and catch-only @try to non-installing entries.
  • signal-owners.ts renderBlock keeps isSuspenseException (87 B) behind a runtime-data test. That is the signals session's hunk; noted for it.
  • Feature apps grow 96–327 B gzip: the frame-window functions, the discard branch now inside rollbackRootRender, and the entry aliases.
  • app-frame-hydration frame-live-sections warm hydration reproduces at 1.035 [1.012–1.054]. It sits inside the ±3% rule and has no profiled hotspot, but the median repeated twice; the PR bench report is the next data point.

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.


Note

Medium Risk
Changes core client render commit/rollback and suspension gating; journal-free bundles diverge from React on thenables, though behavior is gated and covered by new bundle-size and runtime tests.

Overview
Render rollback and client suspension are now opt-in via tree-shaking, instead of every root render always recording an undo journal.

A new ROOT_ROLLBACK flag (rollback-flag.ts) is set only when a bundle keeps an entry that can drop a render—public APIs like use, useBatch, Suspense, @try, and Hydrate wrap implementations with rollbackEntry, while lazy, hydration, native-read validation, and ViewTransition call installRootRollback. The transition journal and related state move into drivers.ts and stay unallocated when the flag never flips, so minifiers can strip journal writers, replay, and suspension paths from minimal apps (roughly 2–3 kB gzip on js-framework and chat-stream per the changeset).

Runtime behavior without the journal is intentionally leaner: uncaught errors and failed root replacements tear down without replay; thrown or child thenables are ordinary render errors (not Suspense), matching the new docs note vs React. Error boundaries and root teardown still work without the journal.

Validation adds render-errors minimal fixture, render-rollback-gates.mjs, and source-map gates so suspense-transition retains rollback symbols while journal-free apps and benchmarks do not.

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

trueadm and others added 2 commits October 28, 2026 01:24
…hat can drop a render

Every root render recorded an undo journal and every bundle shipped
suspension handling. The journal state now lives in drivers.ts behind the
ROOT_ROLLBACK capability, which use, lazy, Suspense, @Try, Hydrate,
hydration, native reads, ViewTransition and renderer regions install as they
load. Without it every journal write and the suspension path fold away, and
a dropped render (an uncaught error, an unmount) is discarded with its root.

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 28, 2026
@trueadm
trueadm marked this pull request as ready for review October 28, 2026 01:38
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 28, 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 f9dbbb8 Commit Preview URL

Branch Preview URL
Oct 28 2026, 02:09 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 28, 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 f9dbbb8 Commit Preview URL

Branch Preview URL
Oct 28 2026, 02:09 AM

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 47 value(s) increased
  • 🔴 bundle-reachability: 40 value(s) increased

Compares d44d6d94c, the merge commit's first parent with 26b92c340 on the same runner. Any increase in a js-framework work counter fails this check; byte changes are a report. 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

target operation base ms head ms head/base 95% CI
octane-jsx select 0.155 0.124 −25.0% −35.6% … −14.7% 🟢 faster
octane-jsx select_lots 1.329 1.120 −16.8% −20.0% … −5.1% 🟢 faster
All 20 timed operations (18 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 4.683 4.225 −11.8% −17.9% … +0.5% ⚪ within noise
octane-tsrx replace 11.583 11.717 +1.1% −11.2% … +14.8% ⚪ within noise
octane-tsrx add 3.758 2.950 −6.9% −32.5% … +3.4% ⚪ within noise
octane-tsrx update 0.117 0.108 −9.0% −11.8% … −2.4% ⚪ within noise
octane-tsrx select 0.007 0.007 −3.2% −11.3% … +0.8% ⚪ within noise
octane-tsrx swap 0.022 0.022 −11.0% −24.6% … +9.8% ⚪ within noise
octane-tsrx remove 0.019 0.019 −2.3% −6.4% … +6.7% ⚪ within noise
octane-tsrx runlots 35.058 32.050 −0.8% −7.5% … +9.2% ⚪ within noise
octane-tsrx select_lots 0.009 0.009 −0.7% −11.3% … +6.9% ⚪ within noise
octane-tsrx clear 74.767 76.075 −3.8% −12.3% … +13.9% ⚪ within noise
octane-jsx run 5.317 5.733 +1.2% −14.7% … +14.3% ⚪ within noise
octane-jsx replace 13.283 12.200 −1.8% −10.8% … +4.8% ⚪ within noise
octane-jsx add 5.200 5.500 +5.4% −6.5% … +14.3% ⚪ within noise
octane-jsx update 0.304 0.280 −4.6% −10.5% … +4.0% ⚪ within noise
octane-jsx select 0.155 0.124 −25.0% −35.6% … −14.7% 🟢 faster
octane-jsx swap 0.280 0.237 −6.8% −16.4% … −0.6% ⚪ within noise
octane-jsx remove 0.206 0.190 −5.2% −12.1% … +4.8% ⚪ within noise
octane-jsx runlots 37.767 34.233 −3.5% −10.0% … +0.7% ⚪ within noise
octane-jsx select_lots 1.329 1.120 −16.8% −20.0% … −5.1% 🟢 faster
octane-jsx clear 77.175 81.667 +0.9% −4.7% … +30.8% ⚪ within noise

Work counters (an increase fails this check):

target metric base head Δ
octane-tsrx calls_run 18,083 18,081 −2 (−0.0%) 🟢
octane-tsrx calls_replace 22,095 22,093 −2 (−0.0%) 🟢
octane-tsrx calls_add 24,083 24,082 −1 (−0.0%) 🟢
octane-tsrx calls_swap 2,089 2,088 −1 (−0.0%) 🟢
octane-tsrx calls_remove 2,097 2,096 −1 (−0.0%) 🟢
octane-tsrx calls_runlots 180,079 180,077 −2 (−0.0%) 🟢
octane-tsrx calls_clear 89 87 −2 (−2.2%) 🟢
octane-jsx calls_run 25,117 25,115 −2 (−0.0%) 🟢
octane-jsx calls_replace 29,130 29,128 −2 (−0.0%) 🟢
octane-jsx calls_add 37,118 37,117 −1 (−0.0%) 🟢
octane-jsx calls_swap 8,122 8,121 −1 (−0.0%) 🟢
octane-jsx calls_remove 8,126 8,125 −1 (−0.0%) 🟢
octane-jsx calls_runlots 250,113 250,111 −2 (−0.0%) 🟢
octane-jsx calls_clear 124 122 −2 (−1.6%) 🟢

50 other measured values are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 85,354 77,634 −7,720 (−9.0%) 🟢
octane-tsrx js_gzip 28,883 26,358 −2,525 (−8.7%) 🟢
octane-tsrx js_brotli 26,060 23,834 −2,226 (−8.5%) 🟢
octane-tsrx app_gzip 2,548 2,546 −2 (−0.1%) 🟢
octane-tsrx app_brotli 2,239 2,233 −6 (−0.3%) 🟢
octane-tsrx fw_raw 78,049 70,329 −7,720 (−9.9%) 🟢
octane-tsrx fw_gzip 26,335 23,812 −2,523 (−9.6%) 🟢
octane-tsrx fw_brotli 23,821 21,601 −2,220 (−9.3%) 🟢
octane-tsrx todo_js_raw 97,834 89,877 −7,957 (−8.1%) 🟢
octane-tsrx todo_js_gzip 33,426 30,764 −2,662 (−8.0%) 🟢
octane-tsrx todo_js_brotli 29,956 27,638 −2,318 (−7.7%) 🟢
octane-tsrx todo_app_brotli 2,262 2,267 +5 (+0.2%) 🔴
octane-tsrx todo_fw_raw 91,885 83,928 −7,957 (−8.7%) 🟢
octane-tsrx todo_fw_gzip 30,749 28,087 −2,662 (−8.7%) 🟢
octane-tsrx todo_fw_brotli 27,694 25,371 −2,323 (−8.4%) 🟢
octane-tsrx chat_js_raw 96,562 88,630 −7,932 (−8.2%) 🟢
octane-tsrx chat_js_gzip 33,135 30,497 −2,638 (−8.0%) 🟢
octane-tsrx chat_js_brotli 29,746 27,505 −2,241 (−7.5%) 🟢
octane-tsrx chat_app_gzip 3,114 3,113 −1 (−0.0%) 🟢
octane-tsrx chat_app_brotli 2,732 2,729 −3 (−0.1%) 🟢
octane-tsrx chat_fw_raw 89,747 81,815 −7,932 (−8.8%) 🟢
octane-tsrx chat_fw_gzip 30,021 27,384 −2,637 (−8.8%) 🟢
octane-tsrx chat_fw_brotli 27,014 24,776 −2,238 (−8.3%) 🟢
octane-tsrx weather_js_raw 132,518 124,180 −8,338 (−6.3%) 🟢
octane-tsrx weather_js_gzip 44,453 41,730 −2,723 (−6.1%) 🟢
octane-tsrx weather_js_brotli 39,486 37,102 −2,384 (−6.0%) 🟢
octane-tsrx weather_app_gzip 8,385 8,384 −1 (−0.0%) 🟢
octane-tsrx weather_app_brotli 7,121 7,130 +9 (+0.1%) 🔴
octane-tsrx weather_fw_raw 108,535 100,197 −8,338 (−7.7%) 🟢
octane-tsrx weather_fw_gzip 36,068 33,346 −2,722 (−7.5%) 🟢
octane-tsrx weather_fw_brotli 32,365 29,972 −2,393 (−7.4%) 🟢
octane-tsrx bindings_js_raw 692,458 681,807 −10,651 (−1.5%) 🟢
octane-tsrx bindings_js_gzip 229,452 225,941 −3,511 (−1.5%) 🟢
octane-tsrx bindings_js_brotli 195,294 192,606 −2,688 (−1.4%) 🟢
octane-tsrx bindings_app_brotli 98,470 98,536 +66 (+0.1%) 🔴
octane-tsrx bindings_fw_raw 334,514 323,863 −10,651 (−3.2%) 🟢
octane-tsrx bindings_fw_gzip 110,798 107,287 −3,511 (−3.2%) 🟢
octane-tsrx bindings_fw_brotli 96,824 94,070 −2,754 (−2.8%) 🟢
octane-tsrx shell_js_raw 293,473 293,702 +229 (+0.1%) 🔴
octane-tsrx shell_js_gzip 95,673 95,779 +106 (+0.1%) 🔴
octane-tsrx shell_js_brotli 83,252 83,426 +174 (+0.2%) 🔴
octane-tsrx shell_app_gzip 1,151 1,154 +3 (+0.3%) 🔴
octane-tsrx shell_app_brotli 1,029 1,035 +6 (+0.6%) 🔴
octane-tsrx shell_fw_raw 291,574 291,803 +229 (+0.1%) 🔴
octane-tsrx shell_fw_gzip 94,522 94,625 +103 (+0.1%) 🔴
octane-tsrx shell_fw_brotli 82,223 82,391 +168 (+0.2%) 🔴
octane-tsrx shell_client_js_raw 238,623 238,840 +217 (+0.1%) 🔴
octane-tsrx shell_client_js_gzip 77,525 77,678 +153 (+0.2%) 🔴
octane-tsrx shell_client_js_brotli 68,092 68,220 +128 (+0.2%) 🔴
octane-tsrx shell_client_fw_raw 236,716 236,933 +217 (+0.1%) 🔴
octane-tsrx shell_client_fw_gzip 76,366 76,519 +153 (+0.2%) 🔴
octane-tsrx shell_client_fw_brotli 67,078 67,206 +128 (+0.2%) 🔴
octane-tsrx wayfinder_js_raw 362,963 362,983 +20 (+0.0%) 🔴
octane-tsrx wayfinder_js_gzip 119,481 119,793 +312 (+0.3%) 🔴
octane-tsrx wayfinder_js_brotli 103,580 103,793 +213 (+0.2%) 🔴
octane-tsrx threadline_oxc_js_raw 148,906 140,465 −8,441 (−5.7%) 🟢
octane-tsrx threadline_oxc_js_gzip 49,638 46,924 −2,714 (−5.5%) 🟢
octane-tsrx threadline_oxc_js_brotli 43,794 41,319 −2,475 (−5.7%) 🟢
octane-tsrx threadline_esbuild_js_raw 174,735 174,877 +142 (+0.1%) 🔴
octane-tsrx threadline_esbuild_js_gzip 59,042 59,131 +89 (+0.2%) 🔴
octane-tsrx threadline_esbuild_js_brotli 51,999 52,198 +199 (+0.4%) 🔴
octane-tsrx pagecraft_oxc_js_raw 547,521 547,539 +18 (+0.0%) 🔴
octane-tsrx pagecraft_oxc_js_gzip 172,375 172,553 +178 (+0.1%) 🔴
octane-tsrx pagecraft_oxc_js_brotli 146,434 146,696 +262 (+0.2%) 🔴
octane-tsrx pagecraft_esbuild_js_raw 581,682 581,716 +34 (+0.0%) 🔴
octane-tsrx pagecraft_esbuild_js_gzip 188,505 188,659 +154 (+0.1%) 🔴
octane-tsrx pagecraft_esbuild_js_brotli 160,265 160,414 +149 (+0.1%) 🔴
octane-tsrx full_fw_raw 535,554 535,395 −159 (−0.0%) 🟢
octane-tsrx full_fw_gzip 167,848 168,033 +185 (+0.1%) 🔴
octane-tsrx full_fw_brotli 142,629 142,875 +246 (+0.2%) 🔴
octane-jsx js_raw 162,640 153,438 −9,202 (−5.7%) 🟢
octane-jsx js_gzip 53,287 50,193 −3,094 (−5.8%) 🟢
octane-jsx js_brotli 47,180 44,481 −2,699 (−5.7%) 🟢
octane-jsx app_gzip 3,512 3,511 −1 (−0.0%) 🟢
octane-jsx app_brotli 2,902 2,890 −12 (−0.4%) 🟢
octane-jsx fw_raw 151,840 142,638 −9,202 (−6.1%) 🟢
octane-jsx fw_gzip 49,775 46,682 −3,093 (−6.2%) 🟢
octane-jsx fw_brotli 44,278 41,591 −2,687 (−6.1%) 🟢
octane-jsx shell_js_raw 337,635 337,775 +140 (+0.0%) 🔴
octane-jsx shell_js_gzip 110,066 110,237 +171 (+0.2%) 🔴
octane-jsx shell_js_brotli 95,670 95,812 +142 (+0.1%) 🔴
octane-jsx shell_app_gzip 776 772 −4 (−0.5%) 🟢
octane-jsx shell_app_brotli 672 667 −5 (−0.7%) 🟢
octane-jsx shell_fw_raw 336,532 336,672 +140 (+0.0%) 🔴
octane-jsx shell_fw_gzip 109,290 109,465 +175 (+0.2%) 🔴
octane-jsx shell_fw_brotli 94,998 95,145 +147 (+0.2%) 🔴
octane-jsx shell_client_js_raw 282,794 282,919 +125 (+0.0%) 🔴
octane-jsx shell_client_js_gzip 91,590 91,767 +177 (+0.2%) 🔴
octane-jsx shell_client_js_brotli 80,231 80,383 +152 (+0.2%) 🔴
octane-jsx shell_client_app_gzip 771 774 +3 (+0.4%) 🔴
octane-jsx shell_client_app_brotli 675 676 +1 (+0.1%) 🔴
octane-jsx shell_client_fw_raw 281,683 281,808 +125 (+0.0%) 🔴
octane-jsx shell_client_fw_gzip 90,819 90,993 +174 (+0.2%) 🔴
octane-jsx shell_client_fw_brotli 79,556 79,707 +151 (+0.2%) 🔴
octane-jsx full_fw_raw 535,554 535,395 −159 (−0.0%) 🟢
octane-jsx full_fw_gzip 167,848 168,033 +185 (+0.1%) 🔴
octane-jsx full_fw_brotli 142,629 142,875 +246 (+0.2%) 🔴

14 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 77,957 70,780 −7,177 (−9.2%) 🟢
cli-spa-starter gzip 27,083 24,734 −2,349 (−8.7%) 🟢
cli-spa-starter brotli 24,333 22,249 −2,084 (−8.6%) 🟢
root-static-specialized raw 50,743 47,286 −3,457 (−6.8%) 🟢
root-static-specialized gzip 17,459 16,228 −1,231 (−7.1%) 🟢
root-static-specialized brotli 15,880 14,769 −1,111 (−7.0%) 🟢
root-chained-jsx raw 52,874 48,653 −4,221 (−8.0%) 🟢
root-chained-jsx gzip 18,158 16,736 −1,422 (−7.8%) 🟢
root-chained-jsx brotli 16,520 15,264 −1,256 (−7.6%) 🟢
root-static raw 93,125 84,799 −8,326 (−8.9%) 🟢
root-static gzip 30,725 27,978 −2,747 (−8.9%) 🟢
root-static brotli 27,613 25,244 −2,369 (−8.6%) 🟢
root-static-local raw 50,642 47,186 −3,456 (−6.8%) 🟢
root-static-local gzip 17,409 16,175 −1,234 (−7.1%) 🟢
root-static-local brotli 15,839 14,729 −1,110 (−7.0%) 🟢
root-callback-local raw 53,293 49,068 −4,225 (−7.9%) 🟢
root-callback-local gzip 18,263 16,830 −1,433 (−7.8%) 🟢
root-callback-local brotli 16,609 15,331 −1,278 (−7.7%) 🟢
hooks-state raw 61,641 57,086 −4,555 (−7.4%) 🟢
hooks-state gzip 21,101 19,569 −1,532 (−7.3%) 🟢
hooks-state brotli 19,163 17,794 −1,369 (−7.1%) 🟢
signal-counter raw 110,904 111,108 +204 (+0.2%) 🔴
signal-counter gzip 36,615 36,727 +112 (+0.3%) 🔴
signal-counter brotli 33,081 33,203 +122 (+0.4%) 🔴
signal-instance-derived raw 126,983 127,180 +197 (+0.2%) 🔴
signal-instance-derived gzip 41,185 41,315 +130 (+0.3%) 🔴
signal-instance-derived brotli 37,155 37,302 +147 (+0.4%) 🔴
prop-attributes raw 58,925 54,444 −4,481 (−7.6%) 🟢
prop-attributes gzip 20,290 18,772 −1,518 (−7.5%) 🟢
prop-attributes brotli 18,454 17,175 −1,279 (−6.9%) 🟢
context raw 69,742 64,541 −5,201 (−7.5%) 🟢
context gzip 23,533 21,759 −1,774 (−7.5%) 🟢
context brotli 21,353 19,714 −1,639 (−7.7%) 🟢
memo-context raw 141,138 132,006 −9,132 (−6.5%) 🟢
memo-context gzip 46,523 43,492 −3,031 (−6.5%) 🟢
memo-context brotli 41,404 38,795 −2,609 (−6.3%) 🟢
controlled-input raw 62,490 58,113 −4,377 (−7.0%) 🟢
controlled-input gzip 21,266 19,790 −1,476 (−6.9%) 🟢
controlled-input brotli 19,255 17,961 −1,294 (−6.7%) 🟢
hydrate-root raw 103,188 103,429 +241 (+0.2%) 🔴
hydrate-root gzip 34,610 34,759 +149 (+0.4%) 🔴
hydrate-root brotli 30,966 31,131 +165 (+0.5%) 🔴
deferred-hydration raw 186,463 186,698 +235 (+0.1%) 🔴
deferred-hydration gzip 60,913 61,028 +115 (+0.2%) 🔴
deferred-hydration brotli 53,298 53,315 +17 (+0.0%) 🔴
hydrate-frame raw 343,998 344,136 +138 (+0.0%) 🔴
hydrate-frame gzip 110,659 110,872 +213 (+0.2%) 🔴
hydrate-frame brotli 96,336 96,541 +205 (+0.2%) 🔴
suspense-transition raw 115,554 159,463 +43,909 (+38.0%) 🔴
suspense-transition gzip 37,879 51,767 +13,888 (+36.7%) 🔴
suspense-transition brotli 33,705 45,691 +11,986 (+35.6%) 🔴
render-errors raw – 112,965 – 🆕
render-errors gzip – 36,718 – 🆕
render-errors brotli – 33,147 – 🆕
component-owned-effects raw 54,826 50,442 −4,384 (−8.0%) 🟢
component-owned-effects gzip 18,794 17,332 −1,462 (−7.8%) 🟢
component-owned-effects brotli 17,117 15,835 −1,282 (−7.5%) 🟢
descriptor-children raw 157,799 148,738 −9,061 (−5.7%) 🟢
descriptor-children gzip 51,510 48,514 −2,996 (−5.8%) 🟢
descriptor-children brotli 45,767 43,259 −2,508 (−5.5%) 🟢
renderable-holes raw 100,285 91,840 −8,445 (−8.4%) 🟢
renderable-holes gzip 33,002 30,201 −2,801 (−8.5%) 🟢
renderable-holes brotli 29,709 27,165 −2,544 (−8.6%) 🟢
binding-hooks raw 64,042 59,522 −4,520 (−7.1%) 🟢
binding-hooks gzip 22,074 20,539 −1,535 (−7.0%) 🟢
binding-hooks brotli 20,026 18,708 −1,318 (−6.6%) 🟢
split-shell raw 395,464 395,592 +128 (+0.0%) 🔴
split-shell gzip 128,960 129,156 +196 (+0.2%) 🔴
split-shell brotli 112,478 112,733 +255 (+0.2%) 🔴
split-shell-runtime raw 322,934 323,062 +128 (+0.0%) 🔴
split-shell-runtime gzip 104,011 104,209 +198 (+0.2%) 🔴
split-shell-runtime brotli 89,986 90,222 +236 (+0.3%) 🔴
binding-base-ui-vite raw 170,542 161,483 −9,059 (−5.3%) 🟢
binding-base-ui-vite gzip 55,835 52,872 −2,963 (−5.3%) 🟢
binding-base-ui-vite brotli 49,597 47,000 −2,597 (−5.2%) 🟢
binding-base-ui-esbuild raw 199,733 199,888 +155 (+0.1%) 🔴
binding-base-ui-esbuild gzip 67,256 67,421 +165 (+0.2%) 🔴
binding-base-ui-esbuild brotli 59,559 59,633 +74 (+0.1%) 🔴
binding-aria-esbuild gzip 2,955 2,954 −1 (−0.0%) 🟢
binding-aria-esbuild brotli 2,648 2,649 +1 (+0.0%) 🔴
binding-radix-vite raw 167,787 158,833 −8,954 (−5.3%) 🟢
binding-radix-vite gzip 54,780 51,842 −2,938 (−5.4%) 🟢
binding-radix-vite brotli 48,675 46,141 −2,534 (−5.2%) 🟢
binding-radix-esbuild raw 197,250 197,409 +159 (+0.1%) 🔴
binding-radix-esbuild gzip 66,350 66,519 +169 (+0.3%) 🔴
binding-radix-esbuild brotli 58,692 58,844 +152 (+0.3%) 🔴
binding-mantine-hooks-vite raw 62,992 58,489 −4,503 (−7.1%) 🟢
binding-mantine-hooks-vite gzip 21,702 20,155 −1,547 (−7.1%) 🟢
binding-mantine-hooks-vite brotli 19,679 18,380 −1,299 (−6.6%) 🟢
binding-mantine-hooks-esbuild raw 79,353 79,539 +186 (+0.2%) 🔴
binding-mantine-hooks-esbuild gzip 28,168 28,268 +100 (+0.4%) 🔴
binding-mantine-hooks-esbuild brotli 25,386 25,529 +143 (+0.6%) 🔴
binding-apollo-client-vite raw 316,891 307,559 −9,332 (−2.9%) 🟢
binding-apollo-client-vite gzip 99,180 96,088 −3,092 (−3.1%) 🟢
binding-apollo-client-vite brotli 87,772 85,246 −2,526 (−2.9%) 🟢
binding-apollo-client-esbuild raw 353,765 353,923 +158 (+0.0%) 🔴
binding-apollo-client-esbuild gzip 114,909 115,093 +184 (+0.2%) 🔴
binding-apollo-client-esbuild brotli 101,310 101,547 +237 (+0.2%) 🔴
binding-usehooks-ts-vite raw 63,773 59,270 −4,503 (−7.1%) 🟢
binding-usehooks-ts-vite gzip 21,941 20,412 −1,529 (−7.0%) 🟢
binding-usehooks-ts-vite brotli 19,900 18,593 −1,307 (−6.6%) 🟢
binding-usehooks-ts-esbuild raw 80,127 80,313 +186 (+0.2%) 🔴
binding-usehooks-ts-esbuild gzip 28,400 28,506 +106 (+0.4%) 🔴
binding-usehooks-ts-esbuild brotli 25,667 25,739 +72 (+0.3%) 🔴

37 other measured values are unchanged.

trueadm and others added 2 commits October 28, 2026 01:55
The joined single-file runtime kept runtime.ts's re-export of
rollback-entries.ts, which imported the runtime modules again, so a
harness that loads the joined text bundled two runtimes. Each entry that
renders and can drop the render now declares its public binding in its own
module as a pure-annotated rollbackEntry() call, and internal callers use
the implementation. The flag moves to rollback-flag.ts, a leaf module like
hydration-flag.ts, so a load-time write can never reach it before it is
initialized under any bundler's module order. lazy() keeps its
no-side-effects factory and installs when it is called.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit 8f5d432 into main Oct 28, 2026
32 checks passed
@trueadm
trueadm deleted the perf/render-rollback-capability branch October 28, 2026 09:38
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
trueadm added a commit that referenced this pull request Oct 28, 2026
…hat-stream

#2256 now guards discardFrontierBlock's Suspense retry lookup with
ROOT_ROLLBACK, so neither application retains it; the creator-installed
check holds them to that.

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

* perf(octane): install commit, owner and native-read leaves from their creators

Applications that never use effects, refs, Effect Events, Activity or
Suspense hides, controlled selects, transitions, signals or hydration no
longer ship the runtime that serves them:

- Effect slots install EFFECT_HOOKS, which gates effect-render retirement,
  the deletion walk over effect slots and the passive hand-offs.
- Every producer of commit-phase callbacks installs COMMIT_WORK: effect
  slots, Effect Events, commit actions, ref attaches and detaches, and
  controlled forms. Without it a commit takes its fast path outright, and
  the capture splice, discard and aborted-ref collection skip those lists.
- Renderer signal-owner tests read `signalDocumentEnabled || registerRootOptions`
  before `renderOwner.signalOwner`: makeRoot is the only owner constructor,
  and only those two can give a root an owner.
- The public owner APIs set a sticky explicitSignalOwners flag. Event
  authority recording and dispatch test it with the signal binding and
  document flags, and the renderer re-enters recorded owners through
  runInSignalOwner, which leaves the flag unwritten, so the cycle that kept
  them in every bundle folds.
- Native-read batches are gated on the engine's batch-hook registration at
  their call sites; signal promotions on the transition root driver, since
  the promotion queue resets itself and never folds.
- applyRefValue becomes a named function expression; its recursion alone
  kept it.

A fresh-runtime test pins each installer; bundle-size gates assert that the
js-framework and chat-stream builds retain none of these declarations while
the other Octane builds in the run retain each one.

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

* fix(octane): install commit work for external-store checks in hidden Activity

A store check queued inside a hidden Activity has no accompanying effect
slot: enqueueEffect returns before creating one there. As the first commit
work a runtime saw, its capture splice skipped the check and left the
consumer queued, so after the reveal no later tear check was enqueued.
enqueueStoreSync installs COMMIT_WORK itself again.

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

* test(bundle-size): gate signalRetryBoundary out of js-framework and chat-stream

#2256 now guards discardFrontierBlock's Suspense retry lookup with
ROOT_ROLLBACK, so neither application retains it; the creator-installed
check holds them to that.

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 perf PR: performance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant