Skip to content

perf(octane): drop unused ref consumers from bundles - #1970

Merged
trueadm merged 3 commits into
octanejs:mainfrom
openai-oss-forks:codex/ref-owner-bundle
Oct 10, 2026
Merged

trueadm merged 3 commits into
octanejs:mainfrom
openai-oss-forks:codex/ref-owner-bundle

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Applications whose compiled runtime does not use refs can omit ref commit drains and subtree ref collection. The existing attach queue installs its drain, collector and detach suppression before publishing its first entry; the detach queue installs its drain before its existing early returns. Installation is monotonic. All four implementation bodies, public ref helpers, spread/deopt/Fragment behavior and queue ordering remain unchanged.

Current compiled spreads snapshot props and queue actual ref publication before publishing their resolved record, so they need no new check. The change adds no per-node fields, records, scheduling operations or calls. Three existing benchmark source/name oracles recognize the renamed implementations while preserving their metric keys and comparisons with older revisions.

Matched complete-production-JavaScript gzip bytes against 4cc2a1ed using Node 24.20.0:

Fixture Canonical Oxc Ordinary/direct esbuild
TSRX rows 32,140 → 31,489 (−651 B) 37,614 → 36,947 (−667 B)
Generic JSX rows 54,702 → 54,760 (+58 B) 65,062 → 65,125 (+63 B)
Base UI control +61 B +51 B
Suspense/transition control −58 B +83 B
Full API namespace +123 B +17 B

The rows reduction is 2,219 raw/507 Brotli bytes with Oxc and 2,394 raw/572 Brotli bytes with esbuild. Full-API raw growth is 92/98 bytes. Feature-retaining bundle growth is included above; these are measured totals, not sums of independent reductions.

Validation

  • pnpm format:check — scoped authored-file formatting and current-head CI lint/format checks pass.
  • pnpm typecheck — runtime/index and the changed test program pass scoped typechecks with no diagnostics; full current-head CI typechecks also pass.
  • pnpm test — all four Node 24 test shards and the aggregate gate pass on current head. React parity, Chromium integration, package validation and example builds also pass.
  • Targeted tests: 20 production-bundle executions across dev/prod, 420 ref/Activity/Suspense/hydration owning cases, and 14 targeted native-ref publication cases pass. 38 unrelated native cases were intentionally skipped. The four new behavior cases also pass against unchanged baseline4cc. Scoped Vitest configuration was used with cached dependencies.
  • Meaningful omitted-installation controls: missing attach/detach drains fail late ref behavior; missing collection fails revealed reattachment; missing suppression produces duplicate hidden-discard detach. Each installation responsibility has a public-behavior failure in dev and prod before reachability assertions; the collector discard case separately fails only its retention assertion and is not counted as behavior proof. Restoring eager consumers fails the no-ref source-map gate. Sources are restored and hash-verified.
  • Original ordinary production call/DOM work: all 64 metrics match exactly. Existing postorder callback/sort controls pass for baseline and candidate.
  • Owning browser work: complete clean ref replacement and mixed-ref hide/discard workflows have identical production calls and DOM work, including settled transport work; all quiet checks are zero. Named controls exercise both drains, collection and suppression, and demonstrate actual default-drain calls before first activation. No production call filters or diagnostic probes enter timing.
  • Exact inverse source proof reconstructs the entire baseline runtime after removing only the new bindings, identity helper and installers and reversing four declaration renames. Staged-DOM classification passes; the performance scan reports zero candidates. Independent source/correctness/work review is clean.
  • perf-review: zero mechanical candidates and no unresolved source finding. queueRefAttach/queueRefDetach (runtime.ts:10213, 10256) run per queued attachment/detachment; their identity guards install stable consumers once. The four module bindings and callback-preserving default (runtime.ts:432, 437) add no hot-record fields, per-call allocation, DOM work or scheduling. Existing consumer calls stay in place; the first-use and steady-work evidence is below.
  • concise-code: source/runtime +23 −4; no new module, public export, type, option or record field. The only new file is the package changeset. Existing queue producers and noop identity checks provide ownership; an unnecessary spread guard was removed after tracing snapshot publication. A return-preserving default is needed for suppression's existing callback result. No separate activation flag, registry or reference count. Measured bytes and feature-retaining growth are listed above.
  • pnpm sync — passed; no generated diff, and all 255 measured package files plus the final test remain hash-identical.

Risk / follow-ups

The prespecified owning timings use Node 24.20.0 and bundled Chromium 149.0.7827.55, with 16 independent fresh browser-process groups per candidate and identical-baseline cohort, balanced creation/execution order, 10 warmup and 12 retained pairs per group. Every realm first executes 1,001 actual no-ref layout commits. All 64 groups, 1,408 paired windows, 38,016 steady/warm bursts and 128 first-use receipts are retained; source/artifact, semantic, cleanup and browser-error guards pass.

Owning workload Candidate/baseline [95% interval] Identical-code control
256 cleanup refs, 12 replacements 0.9977 [0.9938, 1.0104] 0.9996 [0.9924, 1.0063]
32 mixed-ref roots, Suspense hide/discard 0.9941 [0.9882, 1.0040] 0.9997 [0.9864, 1.0113]

No slowdown was detected in these prespecified fresh-group owning workloads; the primary intervals still permit +1.04% and +0.40%. Each sample sums the original internal run durations across 16 or 11 complete fresh prepare/run/verify/cleanup bursts, rather than one continuous window. Retained sums range 24.01–29.68 ms and 26.23–33.47 ms. Primary bootstrap inputs are group arithmetic means.

First preparation and first run are separate, less precise observations; preparation includes the original model construction and assertions. Their intervals all include 1, but replacement's first-run ratio is 1.0225 [0.9974, 1.0404]. Identical-code controls show execution-order effects, which remain in the reported descriptive partitions. These results do not establish a speedup or universal/tail latency. The final independent source and evidence audits are clean; current-head CI remains separate.

The scope-less public attach/spread helpers do not create subtree manifests, and their behavior is unchanged.

Current head 564d5b723 has green current-head CI, no pending or failed checks, no open review threads, and is ready for review and conflict-free. The 19 earlier draft-skipped checks are not counted as validation. The independent local performance evidence and its limits below remain separate from green CI.

Current-head CI benchmark report confirms the rows reduction above and all 64 unchanged work counters. Its synthetic merge 5dcba83e4 has exactly the same Git tree as published head 564d5b723. Additional complete-bundle gzip changes are Todo −636 B, chat −637 B, weather +47 B and bindings +26 B; public-import controls range from savings in ref-free roots/hooks to small growth in feature-retaining bindings and hydration.

CI labels all 20 timings within its ±3% verdict threshold, but three 95% intervals are strictly positive: TSRX clear +2.5% [+0.1%, +4.7%], JSX update +2.0% [+0.6%, +2.8%], and JSX large-list selection +5.3% [+0.6%, +7.9%]. Those observations remain recorded. Unchanged work and the local owning timings do not establish that these distinct operations cannot regress. A single prespecified follow-up addressed only the strongest signal, JSX large-list selection; clear and update remain separate, unattributed CI observations.

The large-list selection follow-up reuses the exact ordinary esbuild artifacts and canonical 10,000-row selection operation. It retains 16 independent fresh browser-process groups per actual and identical-baseline cohort, each with 30 warmup and 10 retained pairs, balanced order and group arithmetic means as primary inputs. All 32 groups and 1,280 pairs, paired-input/row-identity/selection gates, 843 source/config input hashes and eight artifact hashes pass. Independent review reproduced the statistics and provenance.

No slowdown was detected in this local fresh-selection cohort: candidate/baseline 0.9966 [0.9856, 1.0134], identical-code control 1.0045 [0.9942, 1.0209]. All creation/execution-order intervals include 1. The original CI +5.3% observation was not reproduced under this host/history; it is not proved spurious. The candidate interval still permits +1.34%. Batches use 20–28 real alternating selections and retain 25.85–45.36 ms windows; 40 ms was a calibration target, not a minimum. This does not replay the full preceding CI operation history or establish universal/tail performance.

This is an incremental bundle reduction. Current-head CI and independent source/evidence review are complete for this scope, with the cold-use, order and remaining CI timing limitations disclosed above. No merge is requested.

Provenance

  • An agent produced this diff (agent-authored)

Codex task · implementation subtask duplication_audit · host com-79386.


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
Touches core commit-phase ref ordering and Suspense/Activity subtree ref paths, but semantics are intended to be identical after first-queue installation; risk is mainly missed lazy-install edge cases in spread or deferred ref publication.

Overview
Lazy-installs ref commit plumbing so apps that never queue refs can drop ref drain and subtree-collection code from production bundles (~650B on ref-heavy row fixtures per the PR).

The runtime now starts drainRefAttaches, drainRefDetaches, detachSubtreeRefs, and withRefDetachSuppression as no-ops (or a pass-through for suppression). The first queueRefAttach wires the real attach drain, subtree detach walker, and suppression helper; the first queueRefDetach wires the detach drain. Implementation bodies are renamed (drainQueuedRefAttaches, etc.) but behavior at commit is unchanged.

Benchmarks map the new internal names back to existing metric keys. New bundle tests assert ref helpers are absent without refs, fully retained when refs activate late, and subtree helpers stay for Suspense spread-ref hide/reveal.

Reviewed by Cursor Bugbot for commit 7b12dbf. 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 10, 2026
@domgan-oai
domgan-oai marked this pull request as ready for review October 10, 2026 06:23
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 29 value(s) increased
  • 🔴 bundle-reachability: 25 value(s) increased

Compares 5d6d02c8b, the merge commit's first parent with dbd17edbe 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 2.408 2.358 −3.7% −4.0% … ±0.0% ⚪ within noise
octane-tsrx replace 5.242 5.175 −4.7% −7.5% … +0.9% ⚪ within noise
octane-tsrx add 2.225 2.258 −0.0% −4.2% … ±0.0% ⚪ within noise
octane-tsrx update 0.120 0.119 +0.5% −0.5% … +1.4% ⚪ within noise
octane-tsrx select 0.005 0.005 −0.8% −2.1% … +0.3% ⚪ within noise
octane-tsrx swap 0.015 0.015 +0.0% −0.8% … +0.6% ⚪ within noise
octane-tsrx remove 0.012 0.012 −1.0% −3.1% … +2.6% ⚪ within noise
octane-tsrx runlots 22.592 22.383 −1.1% −2.5% … +0.4% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 −0.3% −0.6% … +1.9% ⚪ within noise
octane-tsrx clear 40.050 39.783 +0.0% −1.6% … +1.6% ⚪ within noise
octane-jsx run 3.200 3.075 ±0.0% ±0.0% … +1.6% ⚪ within noise
octane-jsx replace 5.850 5.958 −1.6% −3.3% … +3.3% ⚪ within noise
octane-jsx add 2.933 2.892 ±0.0% −0.0% … +0.0% ⚪ within noise
octane-jsx update 0.235 0.232 −1.3% −2.0% … ±0.0% ⚪ within noise
octane-jsx select 0.125 0.124 ±0.0% −3.6% … +4.7% ⚪ within noise
octane-jsx swap 0.159 0.162 +0.5% −0.5% … +3.3% ⚪ within noise
octane-jsx remove 0.159 0.159 +0.6% −0.0% … +1.2% ⚪ within noise
octane-jsx runlots 26.558 26.967 −1.0% −3.0% … +1.9% ⚪ within noise
octane-jsx select_lots 1.391 1.476 +4.2% +1.5% … +5.5% ⚪ within noise
octane-jsx clear 42.808 42.417 −0.2% −1.6% … +1.8% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 97,028 94,809 −2,219 (−2.3%) 🟢
octane-tsrx js_gzip 32,140 31,489 −651 (−2.0%) 🟢
octane-tsrx js_brotli 28,691 28,184 −507 (−1.8%) 🟢
octane-tsrx app_brotli 2,035 2,039 +4 (+0.2%) 🔴
octane-tsrx fw_raw 90,080 87,861 −2,219 (−2.5%) 🟢
octane-tsrx fw_gzip 29,804 29,153 −651 (−2.2%) 🟢
octane-tsrx fw_brotli 26,656 26,145 −511 (−1.9%) 🟢
octane-tsrx todo_js_raw 106,549 104,330 −2,219 (−2.1%) 🟢
octane-tsrx todo_js_gzip 35,661 35,025 −636 (−1.8%) 🟢
octane-tsrx todo_js_brotli 31,675 31,096 −579 (−1.8%) 🟢
octane-tsrx todo_app_gzip 2,223 2,224 +1 (+0.0%) 🔴
octane-tsrx todo_app_brotli 1,890 1,892 +2 (+0.1%) 🔴
octane-tsrx todo_fw_raw 101,923 99,704 −2,219 (−2.2%) 🟢
octane-tsrx todo_fw_gzip 33,438 32,801 −637 (−1.9%) 🟢
octane-tsrx todo_fw_brotli 29,785 29,204 −581 (−2.0%) 🟢
octane-tsrx chat_js_raw 105,890 103,671 −2,219 (−2.1%) 🟢
octane-tsrx chat_js_gzip 35,532 34,895 −637 (−1.8%) 🟢
octane-tsrx chat_js_brotli 31,662 31,148 −514 (−1.6%) 🟢
octane-tsrx chat_app_gzip 2,719 2,717 −2 (−0.1%) 🟢
octane-tsrx chat_app_brotli 2,387 2,383 −4 (−0.2%) 🟢
octane-tsrx chat_fw_raw 100,119 97,900 −2,219 (−2.2%) 🟢
octane-tsrx chat_fw_gzip 32,813 32,178 −635 (−1.9%) 🟢
octane-tsrx chat_fw_brotli 29,275 28,765 −510 (−1.7%) 🟢
octane-tsrx weather_js_raw 141,657 141,750 +93 (+0.1%) 🔴
octane-tsrx weather_js_gzip 46,924 46,971 +47 (+0.1%) 🔴
octane-tsrx weather_js_brotli 41,372 41,408 +36 (+0.1%) 🔴
octane-tsrx weather_app_gzip 7,843 7,844 +1 (+0.0%) 🔴
octane-tsrx weather_app_brotli 6,668 6,664 −4 (−0.1%) 🟢
octane-tsrx weather_fw_raw 119,496 119,589 +93 (+0.1%) 🔴
octane-tsrx weather_fw_gzip 39,081 39,127 +46 (+0.1%) 🔴
octane-tsrx weather_fw_brotli 34,704 34,744 +40 (+0.1%) 🔴
octane-tsrx bindings_js_raw 678,782 678,884 +102 (+0.0%) 🔴
octane-tsrx bindings_js_gzip 223,608 223,634 +26 (+0.0%) 🔴
octane-tsrx bindings_js_brotli 190,412 190,459 +47 (+0.0%) 🔴
octane-tsrx bindings_app_brotli 96,316 96,272 −44 (−0.0%) 🟢
octane-tsrx bindings_fw_raw 331,129 331,231 +102 (+0.0%) 🔴
octane-tsrx bindings_fw_gzip 107,925 107,951 +26 (+0.0%) 🔴
octane-tsrx bindings_fw_brotli 94,096 94,187 +91 (+0.1%) 🔴
octane-tsrx full_fw_raw 573,378 573,470 +92 (+0.0%) 🔴
octane-tsrx full_fw_gzip 173,333 173,456 +123 (+0.1%) 🔴
octane-tsrx full_fw_brotli 145,784 145,940 +156 (+0.1%) 🔴
octane-jsx js_raw 168,819 168,919 +100 (+0.1%) 🔴
octane-jsx js_gzip 54,702 54,760 +58 (+0.1%) 🔴
octane-jsx js_brotli 47,981 48,005 +24 (+0.1%) 🔴
octane-jsx app_gzip 2,859 2,860 +1 (+0.0%) 🔴
octane-jsx fw_raw 160,546 160,646 +100 (+0.1%) 🔴
octane-jsx fw_gzip 51,843 51,900 +57 (+0.1%) 🔴
octane-jsx fw_brotli 45,571 45,595 +24 (+0.1%) 🔴
octane-jsx full_fw_raw 573,378 573,470 +92 (+0.0%) 🔴
octane-jsx full_fw_gzip 173,333 173,456 +123 (+0.1%) 🔴
octane-jsx full_fw_brotli 145,784 145,940 +156 (+0.1%) 🔴

9 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 87,807 85,592 −2,215 (−2.5%) 🟢
cli-spa-starter gzip 30,045 29,389 −656 (−2.2%) 🟢
cli-spa-starter brotli 26,651 26,082 −569 (−2.1%) 🟢
root-static-specialized raw 59,111 56,901 −2,210 (−3.7%) 🟢
root-static-specialized gzip 19,976 19,315 −661 (−3.3%) 🟢
root-static-specialized brotli 18,079 17,503 −576 (−3.2%) 🟢
root-chained-jsx raw 61,939 59,728 −2,211 (−3.6%) 🟢
root-chained-jsx gzip 20,772 20,116 −656 (−3.2%) 🟢
root-chained-jsx brotli 18,762 18,193 −569 (−3.0%) 🟢
root-static raw 148,734 148,832 +98 (+0.1%) 🔴
root-static gzip 48,172 48,246 +74 (+0.2%) 🔴
root-static brotli 42,461 42,437 −24 (−0.1%) 🟢
root-static-local raw 59,110 56,900 −2,210 (−3.7%) 🟢
root-static-local gzip 19,962 19,298 −664 (−3.3%) 🟢
root-static-local brotli 18,075 17,501 −574 (−3.2%) 🟢
root-callback-local raw 62,399 60,189 −2,210 (−3.5%) 🟢
root-callback-local gzip 20,889 20,234 −655 (−3.1%) 🟢
root-callback-local brotli 18,862 18,344 −518 (−2.7%) 🟢
hooks-state raw 72,301 70,350 −1,951 (−2.7%) 🟢
hooks-state gzip 24,072 23,480 −592 (−2.5%) 🟢
hooks-state brotli 21,682 21,192 −490 (−2.3%) 🟢
prop-attributes raw 69,765 67,550 −2,215 (−3.2%) 🟢
prop-attributes gzip 23,289 22,663 −626 (−2.7%) 🟢
prop-attributes brotli 21,037 20,535 −502 (−2.4%) 🟢
context raw 78,729 76,517 −2,212 (−2.8%) 🟢
context gzip 26,152 25,514 −638 (−2.4%) 🟢
context brotli 23,459 23,007 −452 (−1.9%) 🟢
hydrate-root raw 123,153 120,940 −2,213 (−1.8%) 🟢
hydrate-root gzip 40,124 39,448 −676 (−1.7%) 🟢
hydrate-root brotli 35,329 34,745 −584 (−1.7%) 🟢
deferred-hydration raw 205,437 205,287 −150 (−0.1%) 🟢
deferred-hydration gzip 65,541 65,540 −1 (−0.0%) 🟢
deferred-hydration brotli 56,758 56,762 +4 (+0.0%) 🔴
hydrate-frame raw 350,700 350,802 +102 (+0.0%) 🔴
hydrate-frame gzip 110,487 110,571 +84 (+0.1%) 🔴
hydrate-frame brotli 94,838 94,879 +41 (+0.0%) 🔴
suspense-transition raw 127,624 127,463 −161 (−0.1%) 🟢
suspense-transition gzip 40,894 40,836 −58 (−0.1%) 🟢
suspense-transition brotli 36,210 36,214 +4 (+0.0%) 🔴
component-owned-effects raw 63,229 61,018 −2,211 (−3.5%) 🟢
component-owned-effects gzip 21,258 20,576 −682 (−3.2%) 🟢
component-owned-effects brotli 19,198 18,671 −527 (−2.7%) 🟢
binding-hooks raw 72,884 70,932 −1,952 (−2.7%) 🟢
binding-hooks gzip 24,659 24,068 −591 (−2.4%) 🟢
binding-hooks brotli 22,225 21,730 −495 (−2.2%) 🟢
binding-base-ui-vite raw 187,750 187,851 +101 (+0.1%) 🔴
binding-base-ui-vite gzip 60,394 60,455 +61 (+0.1%) 🔴
binding-base-ui-vite brotli 52,820 52,861 +41 (+0.1%) 🔴
binding-base-ui-esbuild raw 214,912 215,014 +102 (+0.0%) 🔴
binding-base-ui-esbuild gzip 69,901 69,952 +51 (+0.1%) 🔴
binding-base-ui-esbuild brotli 60,729 60,801 +72 (+0.1%) 🔴
binding-radix-vite raw 188,112 188,213 +101 (+0.1%) 🔴
binding-radix-vite gzip 60,273 60,330 +57 (+0.1%) 🔴
binding-radix-vite brotli 52,751 52,794 +43 (+0.1%) 🔴
binding-radix-esbuild raw 215,058 215,160 +102 (+0.0%) 🔴
binding-radix-esbuild gzip 69,809 69,882 +73 (+0.1%) 🔴
binding-radix-esbuild brotli 60,601 60,654 +53 (+0.1%) 🔴
binding-mantine-hooks-vite raw 73,309 71,094 −2,215 (−3.0%) 🟢
binding-mantine-hooks-vite gzip 24,630 23,993 −637 (−2.6%) 🟢
binding-mantine-hooks-vite brotli 22,182 21,653 −529 (−2.4%) 🟢
binding-mantine-hooks-esbuild raw 84,968 82,614 −2,354 (−2.8%) 🟢
binding-mantine-hooks-esbuild gzip 29,038 28,357 −681 (−2.3%) 🟢
binding-mantine-hooks-esbuild brotli 25,906 25,386 −520 (−2.0%) 🟢
binding-apollo-client-vite raw 329,904 330,006 +102 (+0.0%) 🔴
binding-apollo-client-vite gzip 102,619 102,657 +38 (+0.0%) 🔴
binding-apollo-client-vite brotli 89,944 89,983 +39 (+0.0%) 🔴
binding-apollo-client-esbuild raw 365,083 365,185 +102 (+0.0%) 🔴
binding-apollo-client-esbuild gzip 116,306 116,356 +50 (+0.0%) 🔴
binding-apollo-client-esbuild brotli 101,458 101,509 +51 (+0.1%) 🔴
binding-usehooks-ts-vite raw 74,091 71,876 −2,215 (−3.0%) 🟢
binding-usehooks-ts-vite gzip 24,865 24,251 −614 (−2.5%) 🟢
binding-usehooks-ts-vite brotli 22,464 21,854 −610 (−2.7%) 🟢
binding-usehooks-ts-esbuild raw 85,742 83,388 −2,354 (−2.7%) 🟢
binding-usehooks-ts-esbuild gzip 29,268 28,593 −675 (−2.3%) 🟢
binding-usehooks-ts-esbuild brotli 26,117 25,578 −539 (−2.1%) 🟢

36 other measured values are unchanged.

@trueadm

trueadm commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Good to go, with two optional nits. Every ref producer installs its consumers before it publishes, so a noop consumer never has pending work.

  1. Test strength (optional): in the discard arm the callback ref returns a cleanup, so the hide-time detach never shows up in callsAtHide. If hide detached nothing, root.unmount() would still produce cleanups === 1. So discard proves only that there's no duplicate detach, and only reveal (cleanups === 2) proves the detach happened at hide. Recording cleanupsAtHide next to callsAtHide would make both arms prove it.
  2. Placement (optional): the same installed-drain idiom (drainMutationEffects, runLayoutEffects, …) already sits at runtime.ts:695-701, next to activityRefState. The new bindings at L430-439 sit between two profiler helpers instead. Both spots precede every reader, so moving them doesn't affect folding.

Merge note: the conflicts with #1963, #1964, #1966 and #1969 are append-only in optional-driver-bundle.test.ts. Merge the *_DECLARATIONS arrays into one spread list. #1966's new buildApp default parameters stay compatible, and no runtime.ts hunks overlap.

Verified:

  • Attach-queue and manifest writes happen only after queueRefAttach, and detach writes only after queueRefDetach. That covers:
    • compiled refs, which are queued at mount even when null, so a ref that first appears on an update still installs
    • spread updates (__s)
    • de-opt and descriptor hosts
    • Fragment refs
    • Activity and Suspense reveal
    • native replay
      Hydration uses the same compiled path.
  • No synchronous teardown detach was added, and drainCommitRefs still drains detaches before attaches.
  • The benchmark edits only fold the renamed implementations' counts into the existing keys.
  • Bot report: rows, todo and chat each drop about 2.2 kB raw / 640 B gzip, and all 64 work counters are unchanged. The octane-jsx +58 B gzip is expected, because the descriptor path always reaches the installer, and the PR body discloses it.

@domgan-oai

domgan-oai commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Strengthened the test in a72a7f2: both reveal and discard now assert that the cleanup has already run when Suspense hides the subtree. All four development/production cases pass. Removing the hide-detach installer makes both discard cases fail at that new assertion; restoring it passes both again. Runtime source is unchanged. Sync and scoped formatting pass; the signed base integration is 7b12dbf, with all 30 current-head checks passing.

@trueadm
trueadm merged commit 6101f66 into octanejs:main Oct 10, 2026
30 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 10, 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