Skip to content

perf: trim record/commit codegen boilerplate - #2157

Merged
trueadm merged 11 commits into
nextfrom
perf/commit-codegen-trims
Oct 19, 2026
Merged

trueadm merged 11 commits into
nextfrom
perf/commit-codegen-trims

Conversation

@trueadm

@trueadm trueadm commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Zero-runtime-cost trims to the record/commit codegen that #2044 added. Each commit function, update branch and hole-aware walk now emits less boilerplate:

# Change Corpus concat gzip
— next base (e326ff4) 35,424 B
4 _$sibling(x) instead of _$sibling(x, 1) (1 is already the default) 35,375 (−49)
1 No const _n = _b.next; … _b.$ &= 255; prologue in each _c$N: the runtime clears the staged state and passes the cells, so C(bag, cells, careful) ≈ −470
2 _$bagDone(__s, _b): the commit fn already sits in cells[size + 2] ≈ −80 (1+2 together: 34,824, −551)
5 Byte-identical commit functions in one module share one declaration (structural AST key) −355
3 Event-slot commit through one _$setEventSlot call — dropped: it added a production call per changed handler (octane-jsx +20 calls/op) (+27 back)

Total: 35,424 → 34,457 B gzip (−967 B, −2.7%) on the 16-file benchmarks/codegen-size corpus (client, dev:false, hmr:false, esbuild minify, gzip -9 over the concatenated output). Minified: 138,972 → 132,086 B (−5.0%). Per-file gzip sum: 43,465 → 42,483 B.

Changes

  • runtime/commit.ts / engine.ts / suspense.ts: bagRecord queues (commitQueuedBag, bag). The op's identity is what marks a bag's entry: the ops loop, its catch and pool-return branches, dropRootOps and dropBodyOps no longer guess from a target's $ field, which a queued DOM element may carry as an application expando (review finding). The loop inlines commitQueuedBag and bagDone clears state itself, so a commit costs C's call alone: size = (bag.$ &= BAG_SIZE), then cells[size + 2](bag, cells, careful). Clearing precedes the first setter, so a throwing setter leaves the bag idle. (A called trampoline was smaller but added one production call per committed bag and failed the js-framework work gate.)
  • compiler/compile.js:
    • commit fns take (_b, _n[, _f]) and keep only let _v.
    • commitDoneStatement drops the name.
    • the bag factory line is built after emitCommitFunction, through a placeholder like the bag-locals one, so a duplicate body can reuse an earlier name (ctx.commitFunctions, keyed by astStructuralKey). As with template interning, sharing applies only to production builds (!hmr && !dev && !profile), so dev, HMR and profile builds keep one commit function per template for debugging and source maps. Under inspect, each duplicate's origins are aliased onto the shared function's through registerOriginAlias (review finding).
    • siblingCount drops the default step.
  • Tests: view-transition-scope-commit.test.ts gains a case where the scope host carries an application $ of 300 or 3 while its marker op and a template bag commit together; the 300 case fails on the previous head, where $ became 44. compiler-template-origins.test.ts gains a repeated-binding origin case: inspect leaves the code unchanged, prod aliases the second title={props.value} onto the first, and dev needs no alias. commit-functions.test.ts gains a case where two templates share commit code and a third differs only in its setter. Urgent updates, a dropped transition, and a later urgent update each commit through their own bag.

Validation

  • vitest --project octane --project octane-prod: 46,610 / 46,611 pass on the final head. The 1 failure is compiler-vite-options "without quadratic comment scans", a 6 s wall-clock assertion on a template-free module, so no commit fns are involved. It fails only under full parallel load and passes when run alone.
  • Break checks: keying dedupe on params only fails the new test plus 7 others. Not clearing bag state in the ops loop fails 8+ commit-functions tests.
  • pnpm typecheck clean; pnpm format:files:check on changed files clean; pnpm sync produced no changes.
  • pnpm format:check / full pnpm test (left to CI)
  • Same-session A/B, production builds of octane-tsrx fixtures, base = this PR's base built in place, both served statically and run as two TARGETS of each harness, two passes. Median ms, ratio = head/base averaged over passes:
    • js-framework (8 iter): run 1.03, replace 1.00, add 1.00, update 0.83, swap 1.01, remove 0.83, runlots 1.02, clear 0.99
    • dbmon (30 iter): mount 0.99, tick 1.03, tick_partial 0.94, remount 1.01, sort 1.00, unmount 1.00
    • effectful-list (30 iter): mount_1k 1.01, update_deps 1.02, clear 1.00, remount 1.01, remove_100_scattered 1.00
    • All are inside the 0.1 ms timer resolution / ±3% noise, so no regression and no claimed speedup. The production calls and DOM mutations per op are gated by the PR bench.
  • App bundles: the PR bench's byte rows are authoritative. With the inline runtime shape, the framework rows grow by a few tens of bytes (≈+48 raw / +10–30 gzip on fw_*), because the runtime clearing outweighs the compiled savings in these few-template apps. Component-heavy modules gain the corpus savings above. Bytes are report-only; this trade keeps zero added calls.
  • js-framework work counters, node benchmarks/js-framework/pair.mjs --work-only against a base checkout of e326ff4: all 40 calls_* and dom_* counters for octane-tsrx and octane-jsx are identical to base.
  • perf-review: perf-review-scan reports no candidates. Hot path: no added calls. The property load and state write each C used to do moved inline into its two callers, and non-bag ops pay one target?.$ compare, a read the loop's pool-return check already makes. The bag shape is unchanged, there are no new allocations, and the commit fn arity is now 2–3 args, called consistently.
  • concise-code: src +82 −83 (runtime +18 −7). Most of the compile.js diff is the bag-factory call re-indented into a factoryLine closure. No new files except the changeset, no new exports. Alternatives considered:
    • branching in the ops loop to pass cells: rejected because bytes grew in every app;
    • aliasing duplicate commit fns (const _c$5 = _c$3): rejected because it costs bytes per duplicate and keeps the prologue;
    • passing _v as a spare parameter: rejected as a readability hack worth roughly 60 B.

Risk / follow-ups

  • No test observes handler-slot journaling at commit (setEventSlot's JOURNAL_PROP push): removing it leaves all of commit-functions and the transition/event suites green. This gap predates this PR, which leaves that path unchanged, but it is worth a test.
  • Dedupe is per module. Cross-module sharing would need runtime-provided commit fns, which is a different design.

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
Touches core render/commit paths (bag staging, root ops queue, commit function arity) where setter throws and transition drop semantics must stay correct; behavior is heavily tested but the surface area is security-adjacent DOM consistency rather than auth.

Overview
Shrinks compiled record/commit output (~2.7% gzip on the codegen-size corpus) by moving bag staging cleanup into the runtime and deduplicating identical commit helpers.

Runtime / API shape: Hoisted commit functions are now C(bag, cells, careful?) with no per-function prologue—the caller clears bag.$ and passes the staged cell array. _$bagDone(__s, _b) no longer takes the commit fn; it invokes cells[size + 2] like queued commits. Queued bag work uses an explicit commitQueuedBag op instead of inferring bags from target.$, so DOM nodes with app-owned $ expandos are not misclassified.

Compiler: Generated _$sibling(node) omits the second argument when the step is 1. Production builds intern byte-identical commit functions per module (commitFunctions + structural AST key) and wire bag factories after naming; dev/HMR/profile keep one function per template. commitDoneStatement drops the commit name argument.

Tests cover shared commit code across templates, origin aliasing for deduped commits, and commit-queue behavior when a host element carries $.

Reviewed by Cursor Bugbot for commit becfc77. 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 perf PR: performance work labels Oct 19, 2026
@trueadm
trueadm marked this pull request as ready for review October 19, 2026 19:31
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 53 value(s) increased
  • 🔴 bundle-reachability: 73 value(s) increased

Compares e326ff400, the merge commit's first parent with cac9cba1b 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

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 3.125 2.958 −3.3% −6.5% … +6.0% ⚪ within noise
octane-tsrx replace 8.817 8.683 +0.4% −10.0% … +6.7% ⚪ within noise
octane-tsrx add 3.542 3.650 +3.9% −6.3% … +20.0% ⚪ within noise
octane-tsrx update 0.100 0.100 −1.6% −6.2% … +1.3% ⚪ within noise
octane-tsrx select 0.009 0.009 −3.8% −8.3% … +6.9% ⚪ within noise
octane-tsrx swap 0.031 0.030 −1.6% −8.5% … +3.2% ⚪ within noise
octane-tsrx remove 0.025 0.024 −2.1% −7.0% … +5.9% ⚪ within noise
octane-tsrx runlots 35.567 33.800 −5.2% −13.1% … +5.2% ⚪ within noise
octane-tsrx select_lots 0.008 0.008 +0.5% −2.8% … +4.6% ⚪ within noise
octane-tsrx clear 61.100 63.608 +0.1% −4.9% … +12.5% ⚪ within noise
octane-jsx run 4.667 4.375 −7.1% −15.7% … −2.5% ⚪ within noise
octane-jsx replace 9.050 7.942 −5.2% −15.0% … +5.0% ⚪ within noise
octane-jsx add 3.450 3.550 −1.4% −3.9% … +4.6% ⚪ within noise
octane-jsx update 0.195 0.197 +2.1% +0.7% … +4.8% ⚪ within noise
octane-jsx select 0.106 0.109 +3.1% −0.7% … +6.0% ⚪ within noise
octane-jsx swap 0.156 0.157 −0.3% −2.2% … +3.6% ⚪ within noise
octane-jsx remove 0.139 0.141 −1.7% −4.4% … +0.6% ⚪ within noise
octane-jsx runlots 29.200 29.875 −0.2% −7.1% … +4.6% ⚪ within noise
octane-jsx select_lots 1.072 1.053 +1.9% −2.7% … +4.2% ⚪ within noise
octane-jsx clear 54.400 56.200 +2.9% −2.0% … +8.0% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 86,309 86,353 +44 (+0.1%) 🔴
octane-tsrx js_gzip 29,118 29,135 +17 (+0.1%) 🔴
octane-tsrx js_brotli 26,266 26,281 +15 (+0.1%) 🔴
octane-tsrx app_raw 7,556 7,494 −62 (−0.8%) 🟢
octane-tsrx app_gzip 2,617 2,597 −20 (−0.8%) 🟢
octane-tsrx app_brotli 2,274 2,259 −15 (−0.7%) 🟢
octane-tsrx fw_raw 78,753 78,859 +106 (+0.1%) 🔴
octane-tsrx fw_gzip 26,501 26,538 +37 (+0.1%) 🔴
octane-tsrx fw_brotli 23,992 24,022 +30 (+0.1%) 🔴
octane-tsrx todo_js_raw 99,143 99,171 +28 (+0.0%) 🔴
octane-tsrx todo_js_gzip 33,765 33,797 +32 (+0.1%) 🔴
octane-tsrx todo_js_brotli 30,218 30,249 +31 (+0.1%) 🔴
octane-tsrx todo_app_raw 6,241 6,163 −78 (−1.2%) 🟢
octane-tsrx todo_app_gzip 2,779 2,747 −32 (−1.2%) 🟢
octane-tsrx todo_app_brotli 2,338 2,305 −33 (−1.4%) 🟢
octane-tsrx todo_fw_raw 92,902 93,008 +106 (+0.1%) 🔴
octane-tsrx todo_fw_gzip 30,986 31,050 +64 (+0.2%) 🔴
octane-tsrx todo_fw_brotli 27,880 27,944 +64 (+0.2%) 🔴
octane-tsrx chat_js_raw 97,996 97,951 −45 (−0.0%) 🟢
octane-tsrx chat_js_gzip 33,500 33,511 +11 (+0.0%) 🔴
octane-tsrx chat_js_brotli 30,123 30,093 −30 (−0.1%) 🟢
octane-tsrx chat_app_raw 7,141 6,990 −151 (−2.1%) 🟢
octane-tsrx chat_app_gzip 3,211 3,170 −41 (−1.3%) 🟢
octane-tsrx chat_app_brotli 2,805 2,760 −45 (−1.6%) 🟢
octane-tsrx chat_fw_raw 90,855 90,961 +106 (+0.1%) 🔴
octane-tsrx chat_fw_gzip 30,289 30,341 +52 (+0.2%) 🔴
octane-tsrx chat_fw_brotli 27,318 27,333 +15 (+0.1%) 🔴
octane-tsrx weather_js_raw 136,403 136,285 −118 (−0.1%) 🟢
octane-tsrx weather_js_gzip 45,302 45,310 +8 (+0.0%) 🔴
octane-tsrx weather_js_brotli 40,215 40,263 +48 (+0.1%) 🔴
octane-tsrx weather_app_raw 25,087 24,863 −224 (−0.9%) 🟢
octane-tsrx weather_app_gzip 8,625 8,571 −54 (−0.6%) 🟢
octane-tsrx weather_app_brotli 7,328 7,242 −86 (−1.2%) 🟢
octane-tsrx weather_fw_raw 111,316 111,422 +106 (+0.1%) 🔴
octane-tsrx weather_fw_gzip 36,677 36,739 +62 (+0.2%) 🔴
octane-tsrx weather_fw_brotli 32,887 33,021 +134 (+0.4%) 🔴
octane-tsrx bindings_js_raw 685,405 683,131 −2,274 (−0.3%) 🟢
octane-tsrx bindings_js_gzip 226,505 226,148 −357 (−0.2%) 🟢
octane-tsrx bindings_js_brotli 192,935 192,702 −233 (−0.1%) 🟢
octane-tsrx bindings_app_raw 354,182 351,802 −2,380 (−0.7%) 🟢
octane-tsrx bindings_app_gzip 116,965 116,559 −406 (−0.3%) 🟢
octane-tsrx bindings_app_brotli 97,138 96,847 −291 (−0.3%) 🟢
octane-tsrx bindings_fw_raw 331,223 331,329 +106 (+0.0%) 🔴
octane-tsrx bindings_fw_gzip 109,540 109,589 +49 (+0.0%) 🔴
octane-tsrx bindings_fw_brotli 95,797 95,855 +58 (+0.1%) 🔴
octane-tsrx wayfinder_js_raw 438,441 437,239 −1,202 (−0.3%) 🟢
octane-tsrx wayfinder_js_gzip 144,651 144,456 −195 (−0.1%) 🟢
octane-tsrx wayfinder_js_brotli 126,288 126,147 −141 (−0.1%) 🟢
octane-tsrx threadline_oxc_js_raw 153,873 153,297 −576 (−0.4%) 🟢
octane-tsrx threadline_oxc_js_gzip 50,773 50,721 −52 (−0.1%) 🟢
octane-tsrx threadline_oxc_js_brotli 44,763 44,689 −74 (−0.2%) 🟢
octane-tsrx threadline_esbuild_js_raw 178,809 178,138 −671 (−0.4%) 🟢
octane-tsrx threadline_esbuild_js_gzip 59,879 59,845 −34 (−0.1%) 🟢
octane-tsrx threadline_esbuild_js_brotli 52,571 52,682 +111 (+0.2%) 🔴
octane-tsrx pagecraft_oxc_js_raw 544,684 544,342 −342 (−0.1%) 🟢
octane-tsrx pagecraft_oxc_js_gzip 171,339 171,281 −58 (−0.0%) 🟢
octane-tsrx pagecraft_oxc_js_brotli 145,417 145,498 +81 (+0.1%) 🔴
octane-tsrx pagecraft_esbuild_js_raw 577,193 576,769 −424 (−0.1%) 🟢
octane-tsrx pagecraft_esbuild_js_gzip 186,639 186,581 −58 (−0.0%) 🟢
octane-tsrx pagecraft_esbuild_js_brotli 158,734 158,623 −111 (−0.1%) 🟢
octane-tsrx full_fw_raw 522,901 522,995 +94 (+0.0%) 🔴
octane-tsrx full_fw_gzip 163,285 163,325 +40 (+0.0%) 🔴
octane-tsrx full_fw_brotli 138,903 138,999 +96 (+0.1%) 🔴
octane-jsx js_raw 162,492 162,514 +22 (+0.0%) 🔴
octane-jsx js_gzip 53,017 53,050 +33 (+0.1%) 🔴
octane-jsx js_brotli 46,817 46,869 +52 (+0.1%) 🔴
octane-jsx app_raw 11,059 10,975 −84 (−0.8%) 🟢
octane-jsx app_gzip 3,581 3,556 −25 (−0.7%) 🟢
octane-jsx app_brotli 2,888 2,890 +2 (+0.1%) 🔴
octane-jsx fw_raw 151,433 151,539 +106 (+0.1%) 🔴
octane-jsx fw_gzip 49,436 49,494 +58 (+0.1%) 🔴
octane-jsx fw_brotli 43,929 43,979 +50 (+0.1%) 🔴
octane-jsx shell_js_raw 327,272 327,352 +80 (+0.0%) 🔴
octane-jsx shell_js_gzip 106,653 106,673 +20 (+0.0%) 🔴
octane-jsx shell_js_brotli 92,589 92,633 +44 (+0.0%) 🔴
octane-jsx shell_app_gzip 767 765 −2 (−0.3%) 🟢
octane-jsx shell_fw_raw 326,179 326,259 +80 (+0.0%) 🔴
octane-jsx shell_fw_gzip 105,886 105,908 +22 (+0.0%) 🔴
octane-jsx shell_fw_brotli 91,936 91,980 +44 (+0.0%) 🔴
octane-jsx shell_client_js_raw 278,665 278,745 +80 (+0.0%) 🔴
octane-jsx shell_client_js_gzip 90,244 90,297 +53 (+0.1%) 🔴
octane-jsx shell_client_js_brotli 78,861 78,985 +124 (+0.2%) 🔴
octane-jsx shell_client_app_gzip 765 771 +6 (+0.8%) 🔴
octane-jsx shell_client_app_brotli 664 668 +4 (+0.6%) 🔴
octane-jsx shell_client_fw_raw 277,564 277,644 +80 (+0.0%) 🔴
octane-jsx shell_client_fw_gzip 89,479 89,526 +47 (+0.1%) 🔴
octane-jsx shell_client_fw_brotli 78,197 78,317 +120 (+0.2%) 🔴
octane-jsx full_fw_raw 522,901 522,995 +94 (+0.0%) 🔴
octane-jsx full_fw_gzip 163,285 163,325 +40 (+0.0%) 🔴
octane-jsx full_fw_brotli 138,903 138,999 +96 (+0.1%) 🔴

3 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 78,595 78,682 +87 (+0.1%) 🔴
cli-spa-starter gzip 27,243 27,273 +30 (+0.1%) 🔴
cli-spa-starter brotli 24,458 24,492 +34 (+0.1%) 🔴
root-static-specialized raw 50,860 50,952 +92 (+0.2%) 🔴
root-static-specialized gzip 17,435 17,461 +26 (+0.1%) 🔴
root-static-specialized brotli 15,862 15,883 +21 (+0.1%) 🔴
root-chained-jsx raw 53,003 53,090 +87 (+0.2%) 🔴
root-chained-jsx gzip 18,128 18,163 +35 (+0.2%) 🔴
root-chained-jsx brotli 16,510 16,552 +42 (+0.3%) 🔴
root-static raw 138,078 138,170 +92 (+0.1%) 🔴
root-static gzip 45,229 45,280 +51 (+0.1%) 🔴
root-static brotli 40,294 40,330 +36 (+0.1%) 🔴
root-static-local raw 50,761 50,853 +92 (+0.2%) 🔴
root-static-local gzip 17,385 17,415 +30 (+0.2%) 🔴
root-static-local brotli 15,828 15,853 +25 (+0.2%) 🔴
root-callback-local raw 53,420 53,507 +87 (+0.2%) 🔴
root-callback-local gzip 18,231 18,270 +39 (+0.2%) 🔴
root-callback-local brotli 16,589 16,642 +53 (+0.3%) 🔴
hooks-state raw 61,770 61,857 +87 (+0.1%) 🔴
hooks-state gzip 21,058 21,073 +15 (+0.1%) 🔴
hooks-state brotli 19,141 19,158 +17 (+0.1%) 🔴
prop-attributes raw 58,876 58,963 +87 (+0.1%) 🔴
prop-attributes gzip 20,188 20,222 +34 (+0.2%) 🔴
prop-attributes brotli 18,454 18,396 −58 (−0.3%) 🟢
context raw 69,559 69,644 +85 (+0.1%) 🔴
context gzip 23,374 23,424 +50 (+0.2%) 🔴
context brotli 21,180 21,218 +38 (+0.2%) 🔴
hydrate-root raw 96,218 96,305 +87 (+0.1%) 🔴
hydrate-root gzip 32,375 32,410 +35 (+0.1%) 🔴
hydrate-root brotli 28,916 28,941 +25 (+0.1%) 🔴
deferred-hydration raw 180,222 180,297 +75 (+0.0%) 🔴
deferred-hydration gzip 58,760 58,802 +42 (+0.1%) 🔴
deferred-hydration brotli 51,358 51,352 −6 (−0.0%) 🟢
hydrate-frame raw 340,528 340,555 +27 (+0.0%) 🔴
hydrate-frame gzip 109,345 109,372 +27 (+0.0%) 🔴
hydrate-frame brotli 94,927 94,986 +59 (+0.1%) 🔴
suspense-transition raw 115,378 115,432 +54 (+0.0%) 🔴
suspense-transition gzip 37,735 37,745 +10 (+0.0%) 🔴
suspense-transition brotli 33,560 33,587 +27 (+0.1%) 🔴
component-owned-effects raw 54,949 55,035 +86 (+0.2%) 🔴
component-owned-effects gzip 18,754 18,794 +40 (+0.2%) 🔴
component-owned-effects brotli 17,102 17,132 +30 (+0.2%) 🔴
descriptor-children raw 159,719 159,813 +94 (+0.1%) 🔴
descriptor-children gzip 51,891 51,938 +47 (+0.1%) 🔴
descriptor-children brotli 46,151 46,205 +54 (+0.1%) 🔴
binding-hooks raw 64,169 64,256 +87 (+0.1%) 🔴
binding-hooks gzip 22,051 22,087 +36 (+0.2%) 🔴
binding-hooks brotli 20,019 20,072 +53 (+0.3%) 🔴
split-shell raw 391,405 391,381 −24 (−0.0%) 🟢
split-shell gzip 127,465 127,463 −2 (−0.0%) 🟢
split-shell brotli 111,149 111,143 −6 (−0.0%) 🟢
split-shell-runtime raw 316,189 316,283 +94 (+0.0%) 🔴
split-shell-runtime gzip 101,702 101,749 +47 (+0.0%) 🔴
split-shell-runtime brotli 87,964 88,010 +46 (+0.1%) 🔴
binding-base-ui-vite raw 170,229 170,321 +92 (+0.1%) 🔴
binding-base-ui-vite gzip 55,510 55,558 +48 (+0.1%) 🔴
binding-base-ui-vite brotli 49,346 49,384 +38 (+0.1%) 🔴
binding-base-ui-esbuild raw 198,432 198,522 +90 (+0.0%) 🔴
binding-base-ui-esbuild gzip 66,648 66,697 +49 (+0.1%) 🔴
binding-base-ui-esbuild brotli 58,884 58,950 +66 (+0.1%) 🔴
binding-radix-vite raw 169,673 169,765 +92 (+0.1%) 🔴
binding-radix-vite gzip 55,196 55,244 +48 (+0.1%) 🔴
binding-radix-vite brotli 49,045 49,021 −24 (−0.0%) 🟢
binding-radix-esbuild raw 197,920 198,010 +90 (+0.0%) 🔴
binding-radix-esbuild gzip 66,330 66,385 +55 (+0.1%) 🔴
binding-radix-esbuild brotli 58,654 58,634 −20 (−0.0%) 🟢
binding-mantine-hooks-vite raw 63,108 63,195 +87 (+0.1%) 🔴
binding-mantine-hooks-vite gzip 21,694 21,728 +34 (+0.2%) 🔴
binding-mantine-hooks-vite brotli 19,761 19,741 −20 (−0.1%) 🟢
binding-mantine-hooks-esbuild raw 77,698 77,783 +85 (+0.1%) 🔴
binding-mantine-hooks-esbuild gzip 27,545 27,593 +48 (+0.2%) 🔴
binding-mantine-hooks-esbuild brotli 24,909 24,893 −16 (−0.1%) 🟢
binding-apollo-client-vite raw 314,977 315,064 +87 (+0.0%) 🔴
binding-apollo-client-vite gzip 98,453 98,489 +36 (+0.0%) 🔴
binding-apollo-client-vite brotli 87,209 87,197 −12 (−0.0%) 🟢
binding-apollo-client-esbuild raw 350,376 350,461 +85 (+0.0%) 🔴
binding-apollo-client-esbuild gzip 113,653 113,694 +41 (+0.0%) 🔴
binding-apollo-client-esbuild brotli 100,255 100,224 −31 (−0.0%) 🟢
binding-usehooks-ts-vite raw 63,890 63,977 +87 (+0.1%) 🔴
binding-usehooks-ts-vite gzip 21,933 21,966 +33 (+0.2%) 🔴
binding-usehooks-ts-vite brotli 19,923 19,956 +33 (+0.2%) 🔴
binding-usehooks-ts-esbuild raw 78,466 78,551 +85 (+0.1%) 🔴
binding-usehooks-ts-esbuild gzip 27,782 27,845 +63 (+0.2%) 🔴
binding-usehooks-ts-esbuild brotli 25,085 25,175 +90 (+0.4%) 🔴

39 other measured values are unchanged.

@cloudflare-workers-and-pages

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

Branch Preview URL
Oct 19 2026, 08:37 PM

The commitStagedBag trampoline and the unconditional setEventSlot call each
added production calls per committed bag or handler; js-framework work
counters now match the base exactly.

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

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

Branch Preview URL
Oct 19 2026, 08:38 PM

@domgan-oai domgan-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not approve this as-is. The code-size result and unchanged work counters are encouraging, and the current checks are green, but the queue now misclassifies some valid non-bag targets. The commit-function sharing also loses source attribution for later templates. Please address the two inline findings before merging.

Comment thread packages/octane/src/runtime/engine.ts Resolved
Comment thread packages/octane/src/compiler/compile.js Resolved
trueadm and others added 2 commits October 19, 2026 21:26
A queued DOM element can carry an application's own `$` expando, which the
ops loop, its pool return, dropRootOps and dropBodyOps took for a bag.
commitQueuedBag marks a bag's entry; the loop inlines it, so the work
counters stay at base.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit 32dc7f1 into next Oct 19, 2026
59 of 62 checks passed
@trueadm
trueadm deleted the perf/commit-codegen-trims branch October 19, 2026 21:57
trueadm added a commit that referenced this pull request Oct 23, 2026
#2157 merged into `next` as 32dc7f1 after `next` had already landed on
main (#2103), so its compiled-output saving never shipped. Cherry-picked onto
main; the one conflict kept main's bagOf rehome argument in the spill path.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot mentioned this pull request Oct 23, 2026
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.

2 participants