Skip to content

perf(octane): share nearest-provider records across direct context reads - #2084

Closed
domgan-oai wants to merge 4 commits into
octanejs:nextfrom
openai-oss-forks:codex/next-share-provider-reads
Closed

domgan-oai wants to merge 4 commits into
octanejs:nextfrom
openai-oss-forks:codex/next-share-provider-reads

Conversation

@domgan-oai

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

Copy link
Copy Markdown
Contributor

Summary

Reading from a nearest provider previously stamped its own aggregate, then allocated a reader Map and a new record for the same value on every render. Record the context at ancestor frontiers, share one stable owner/value/version record from the provider, and inline the first direct read before spilling to a Map. Explicitly stamp hosted/coarse readers so sibling invalidation remains correct.

Adapt cached-context restamping and deferred hydration to next's current ABI: The #2090 port keeps context, component slots, hydration boundary, block, render and types in their owning modules; runtime.ts stays next's unmodified facade. SSR values stay raw, activation wraps records owned by the activation block, and DevTools unwraps for display. Extracted from #2036; applies independently to next.

Validation

  • Final scoped formatting and typecheck on the three added test/fixture files; pnpm sync with no generated drift and git diff --check.
  • 14 deferred-hydration tests (dev/prod) and 5 real DevTools profile tests. The new case puts a changing provider above a still-deferred direct reader, changes it again after activation, and asserts the value, state, typed draft and node identity without recovery. The DevTools check passes an actual raw object with its own value/owner keys, both before and after update.
  • Before these test-only additions: 266 local provider/context tests and 21 bundle gates; 30/30 hosted checks at 2441420 including full typecheck, CI and both bundle reporters.
  • 6fc19bb before next split: all 31 hosted checks passed, including CI and benchmark.
  • Post-refactor(octane): split runtime.ts into concept modules #2090 module port: 254 provider/hydration tests, 5 DevTools profile tests, 21 bundle/entrypoint tests, scoped source typecheck, formatting, and pnpm sync without generated drift.
  • ae23679: PR benchmark passed against split next, all 64 work counters unchanged, all 20 timings within noise.
  • ae23679: 32/32 hosted checks passed, including all Node 24, parity and Chromium shards; website, types, bundle, packages and provenance. CI 38750509126.

Targeted provider measurement

Measured the current post-#2090 implementation ae2367930 against its actual merge base ee7d52073. The checked-in benchmarks/memo-wall/octane-tsrx workload was built separately for each revision with identical fixture source hashes, the same production Oxc toolchain, and source maps checked against the selected runtime. Wall A uses a compiled list; wall B uses returned component descriptors. Each wall has 1,000 direct context readers. Real Chromium, two warmup pairs and 18 alternating measurement pairs, with 10 provider changes per sample:

Provider shape A update, paired change [95% CI] B update, paired change [95% CI]
Distinct contexts −16.7% [−18.6%, −13.5%] −12.7% [−13.2%, −9.3%]
Sibling providers, same context −16.2% [−18.9%, −14.1%] −24.3% [−25.6%, −19.4%]
Separate roots, same context −14.0% [−21.2%, −9.5%] −23.7% [−30.2%, −21.1%]

The update-plus-unchanged-sibling-bail case was also measured in both directions for each shape. For all 12 cases, both revisions performed exactly 10,000 owning leaf renders and zero sibling, row, or inner renders in every sample; live values and original host identity were checked after every timed sample. In the same-context sibling-bail cases, paired timing was −15.1% and −21.8%. The full production JavaScript gzip in the three targeted fixtures grew +10/+10/+39 B (raw +132 B each). The independent current-head PR benchmark's broader app costs are below.

A matched baseline/baseline control included zero in 9/12 intervals. Three controls showed asymmetry: distinct-context A −2.5%, same-context sibling B −4.9%, and separate-root A +7.0%. The direction of the provider-update improvement is consistent across the measured shapes, but individual percentages are not wholly attributable to this change. This measures synchronous update time, not allocation bytes or end-user latency.

Size / risk

Current PR bench, next ee7d520 → merge e5e9eb2 of ae23679: full JavaScript gzip TSRX 31,333 → 31,376 B (+43), JSX 55,100 → 55,219 B (+119). Threadline Oxc 52,860 → 52,880 B (+20) / esbuild 59,796 → 59,821 B (+25). Pagecraft Oxc 171,281 → 171,318 B (+37) / esbuild 186,569 → 186,597 B (+28). Raw deltas are +132/+424 B in TSRX/JSX and +79/+71 B Threadline, +132/+125 B Pagecraft. All 64 work counters unchanged and all 20 paired js-framework timings within noise. Across 41 reachability probes, gzip deltas range −6 to +137 B; 13 are byte-identical, including capture-only, SSR, split-shell-signals and both behavior roots. These are small but real context-capable bundle costs for shared direct reads.

Provenance

  • An agent produced this diff (agent-authored)

Implementation: Codex task · host com-79386.


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 context versioning, memo/implicit bailouts, compiler cache restamping, and deferred hydration—areas where subtle stale-value bugs are possible, though behavior is heavily regression-tested.

Overview
Context providers and consumers now store ProvidedContext records (value, owner, version) in $$ctxValues instead of raw values. provideContext and the read path stamp and return provided.value, while memo/bailout logic compares against the shared record.

Direct reads reuse the nearest provider’s record when the read is verifiable (sibling-provider case): the first direct dependency can live inline on $$ctxDirect as that record instead of always allocating a Map and a duplicate { owner, value, version }. Hosted/coarse/mixed reads stay conservative; recordLocalContextValue is removed in favor of recordContextDependency during readContextFrom.

Downstream ABI tweaks: render clears $$ctxDirect for Map vs single-record shapes; cached-context restamping and deferred hydration build or compare ProvidedContext where activation needs owner metadata; DevTools previews value.value so objects with their own value field display correctly.

Tests cover outer provider changes before/after a deferred hydrate reader and DevTools context preview for nested { value, owner } payloads.

Reviewed by Cursor Bugbot for commit ae23679. 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 15, 2026
@github-actions
github-actions Bot marked this pull request as draft October 15, 2026 12:35
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 67 value(s) increased
  • 🔴 bundle-reachability: 75 value(s) increased

Compares ee7d52073, the merge commit's first parent with e5e9eb23a 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 4.950 4.958 −3.5% −11.5% … +3.3% ⚪ within noise
octane-tsrx replace 10.383 10.633 +4.3% −0.6% … +14.7% ⚪ within noise
octane-tsrx add 2.792 2.842 +0.0% −3.3% … +3.8% ⚪ within noise
octane-tsrx update 0.108 0.111 −1.2% −5.9% … +4.3% ⚪ within noise
octane-tsrx select 0.007 0.007 −2.6% −7.3% … +9.1% ⚪ within noise
octane-tsrx swap 0.020 0.023 +2.1% −6.0% … +13.5% ⚪ within noise
octane-tsrx remove 0.023 0.025 +1.3% −6.6% … +4.5% ⚪ within noise
octane-tsrx runlots 32.892 30.517 +3.9% −2.1% … +8.1% ⚪ within noise
octane-tsrx select_lots 0.011 0.010 −6.1% −9.6% … +2.9% ⚪ within noise
octane-tsrx clear 89.825 89.217 +2.4% −7.3% … +13.7% ⚪ within noise
octane-jsx run 7.558 7.367 +5.3% −1.1% … +11.4% ⚪ within noise
octane-jsx replace 16.167 13.933 +0.1% −8.8% … +7.2% ⚪ within noise
octane-jsx add 6.000 5.283 +10.6% −8.8% … +18.1% ⚪ within noise
octane-jsx update 0.243 0.243 −6.5% −14.8% … +3.5% ⚪ within noise
octane-jsx select 0.104 0.106 +1.6% −4.2% … +4.6% ⚪ within noise
octane-jsx swap 0.170 0.164 −2.8% −5.2% … +1.0% ⚪ within noise
octane-jsx remove 0.159 0.151 −1.1% −8.4% … +2.7% ⚪ within noise
octane-jsx runlots 32.608 35.033 +4.5% −7.0% … +11.9% ⚪ within noise
octane-jsx select_lots 1.423 1.304 +0.4% −11.0% … +9.3% ⚪ within noise
octane-jsx clear 47.783 52.475 +7.4% −1.1% … +12.3% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 93,565 93,697 +132 (+0.1%) 🔴
octane-tsrx js_gzip 31,333 31,376 +43 (+0.1%) 🔴
octane-tsrx js_brotli 28,287 28,279 −8 (−0.0%) 🟢
octane-tsrx app_brotli 2,268 2,269 +1 (+0.0%) 🔴
octane-tsrx fw_raw 86,009 86,141 +132 (+0.2%) 🔴
octane-tsrx fw_gzip 28,716 28,759 +43 (+0.1%) 🔴
octane-tsrx fw_brotli 26,019 26,010 −9 (−0.0%) 🟢
octane-tsrx todo_js_raw 106,404 106,536 +132 (+0.1%) 🔴
octane-tsrx todo_js_gzip 35,995 36,036 +41 (+0.1%) 🔴
octane-tsrx todo_js_brotli 32,203 32,238 +35 (+0.1%) 🔴
octane-tsrx todo_app_brotli 2,336 2,334 −2 (−0.1%) 🟢
octane-tsrx todo_fw_raw 100,163 100,295 +132 (+0.1%) 🔴
octane-tsrx todo_fw_gzip 33,216 33,257 +41 (+0.1%) 🔴
octane-tsrx todo_fw_brotli 29,867 29,904 +37 (+0.1%) 🔴
octane-tsrx chat_js_raw 105,255 105,387 +132 (+0.1%) 🔴
octane-tsrx chat_js_gzip 35,732 35,772 +40 (+0.1%) 🔴
octane-tsrx chat_js_brotli 32,031 32,087 +56 (+0.2%) 🔴
octane-tsrx chat_app_gzip 3,210 3,211 +1 (+0.0%) 🔴
octane-tsrx chat_app_brotli 2,797 2,788 −9 (−0.3%) 🟢
octane-tsrx chat_fw_raw 98,114 98,246 +132 (+0.1%) 🔴
octane-tsrx chat_fw_gzip 32,522 32,561 +39 (+0.1%) 🔴
octane-tsrx chat_fw_brotli 29,234 29,299 +65 (+0.2%) 🔴
octane-tsrx weather_js_raw 143,023 143,078 +55 (+0.0%) 🔴
octane-tsrx weather_js_gzip 47,339 47,351 +12 (+0.0%) 🔴
octane-tsrx weather_js_brotli 42,040 41,960 −80 (−0.2%) 🟢
octane-tsrx weather_app_gzip 8,624 8,623 −1 (−0.0%) 🟢
octane-tsrx weather_app_brotli 7,329 7,300 −29 (−0.4%) 🟢
octane-tsrx weather_fw_raw 117,936 117,991 +55 (+0.0%) 🔴
octane-tsrx weather_fw_gzip 38,715 38,728 +13 (+0.0%) 🔴
octane-tsrx weather_fw_brotli 34,711 34,660 −51 (−0.1%) 🟢
octane-tsrx bindings_js_raw 685,281 685,413 +132 (+0.0%) 🔴
octane-tsrx bindings_js_gzip 226,456 226,499 +43 (+0.0%) 🔴
octane-tsrx bindings_js_brotli 192,857 192,982 +125 (+0.1%) 🔴
octane-tsrx bindings_app_brotli 97,156 97,097 −59 (−0.1%) 🟢
octane-tsrx bindings_fw_raw 331,099 331,231 +132 (+0.0%) 🔴
octane-tsrx bindings_fw_gzip 109,491 109,534 +43 (+0.0%) 🔴
octane-tsrx bindings_fw_brotli 95,701 95,885 +184 (+0.2%) 🔴
octane-tsrx wayfinder_js_raw 438,470 438,602 +132 (+0.0%) 🔴
octane-tsrx wayfinder_js_gzip 144,794 144,821 +27 (+0.0%) 🔴
octane-tsrx wayfinder_js_brotli 126,433 126,391 −42 (−0.0%) 🟢
octane-tsrx threadline_oxc_js_raw 160,616 160,695 +79 (+0.0%) 🔴
octane-tsrx threadline_oxc_js_gzip 52,860 52,880 +20 (+0.0%) 🔴
octane-tsrx threadline_oxc_js_brotli 46,455 46,510 +55 (+0.1%) 🔴
octane-tsrx threadline_esbuild_js_raw 178,635 178,706 +71 (+0.0%) 🔴
octane-tsrx threadline_esbuild_js_gzip 59,796 59,821 +25 (+0.0%) 🔴
octane-tsrx threadline_esbuild_js_brotli 52,629 52,568 −61 (−0.1%) 🟢
octane-tsrx pagecraft_oxc_js_raw 544,561 544,693 +132 (+0.0%) 🔴
octane-tsrx pagecraft_oxc_js_gzip 171,281 171,318 +37 (+0.0%) 🔴
octane-tsrx pagecraft_oxc_js_brotli 145,353 145,463 +110 (+0.1%) 🔴
octane-tsrx pagecraft_esbuild_js_raw 577,018 577,143 +125 (+0.0%) 🔴
octane-tsrx pagecraft_esbuild_js_gzip 186,569 186,597 +28 (+0.0%) 🔴
octane-tsrx pagecraft_esbuild_js_brotli 158,588 158,583 −5 (−0.0%) 🟢
octane-tsrx full_fw_raw 522,733 522,931 +198 (+0.0%) 🔴
octane-tsrx full_fw_gzip 163,178 163,211 +33 (+0.0%) 🔴
octane-tsrx full_fw_brotli 138,796 138,836 +40 (+0.0%) 🔴
octane-jsx js_raw 169,120 169,544 +424 (+0.3%) 🔴
octane-jsx js_gzip 55,100 55,219 +119 (+0.2%) 🔴
octane-jsx js_brotli 48,603 48,824 +221 (+0.5%) 🔴
octane-jsx app_brotli 2,889 2,895 +6 (+0.2%) 🔴
octane-jsx fw_raw 158,061 158,485 +424 (+0.3%) 🔴
octane-jsx fw_gzip 51,519 51,638 +119 (+0.2%) 🔴
octane-jsx fw_brotli 45,714 45,929 +215 (+0.5%) 🔴
octane-jsx shell_js_raw 327,283 327,708 +425 (+0.1%) 🔴
octane-jsx shell_js_gzip 106,645 106,774 +129 (+0.1%) 🔴
octane-jsx shell_js_brotli 92,578 92,638 +60 (+0.1%) 🔴
octane-jsx shell_app_brotli 655 658 +3 (+0.5%) 🔴
octane-jsx shell_fw_raw 326,190 326,615 +425 (+0.1%) 🔴
octane-jsx shell_fw_gzip 105,880 106,009 +129 (+0.1%) 🔴
octane-jsx shell_fw_brotli 91,923 91,980 +57 (+0.1%) 🔴
octane-jsx shell_client_js_raw 278,749 279,174 +425 (+0.2%) 🔴
octane-jsx shell_client_js_gzip 90,294 90,405 +111 (+0.1%) 🔴
octane-jsx shell_client_js_brotli 78,985 79,014 +29 (+0.0%) 🔴
octane-jsx shell_client_app_gzip 767 768 +1 (+0.1%) 🔴
octane-jsx shell_client_app_brotli 660 656 −4 (−0.6%) 🟢
octane-jsx shell_client_fw_raw 277,648 278,073 +425 (+0.2%) 🔴
octane-jsx shell_client_fw_gzip 89,527 89,637 +110 (+0.1%) 🔴
octane-jsx shell_client_fw_brotli 78,325 78,358 +33 (+0.0%) 🔴
octane-jsx full_fw_raw 522,733 522,931 +198 (+0.0%) 🔴
octane-jsx full_fw_gzip 163,178 163,211 +33 (+0.0%) 🔴
octane-jsx full_fw_brotli 138,796 138,836 +40 (+0.0%) 🔴

13 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 85,850 85,982 +132 (+0.2%) 🔴
cli-spa-starter gzip 29,525 29,565 +40 (+0.1%) 🔴
cli-spa-starter brotli 26,430 26,479 +49 (+0.2%) 🔴
root-static-specialized raw 57,141 57,273 +132 (+0.2%) 🔴
root-static-specialized gzip 19,381 19,430 +49 (+0.3%) 🔴
root-static-specialized brotli 17,642 17,679 +37 (+0.2%) 🔴
root-chained-jsx raw 59,282 59,414 +132 (+0.2%) 🔴
root-chained-jsx gzip 20,097 20,133 +36 (+0.2%) 🔴
root-chained-jsx brotli 18,313 18,331 +18 (+0.1%) 🔴
root-static raw 144,698 144,777 +79 (+0.1%) 🔴
root-static gzip 47,262 47,256 −6 (−0.0%) 🟢
root-static-local raw 57,040 57,172 +132 (+0.2%) 🔴
root-static-local gzip 19,335 19,386 +51 (+0.3%) 🔴
root-static-local brotli 17,607 17,640 +33 (+0.2%) 🔴
root-callback-local raw 59,700 59,832 +132 (+0.2%) 🔴
root-callback-local gzip 20,180 20,234 +54 (+0.3%) 🔴
root-callback-local brotli 18,362 18,403 +41 (+0.2%) 🔴
hooks-state raw 68,052 68,184 +132 (+0.2%) 🔴
hooks-state gzip 23,027 23,090 +63 (+0.3%) 🔴
hooks-state brotli 20,913 20,974 +61 (+0.3%) 🔴
prop-attributes raw 65,155 65,287 +132 (+0.2%) 🔴
prop-attributes gzip 22,148 22,208 +60 (+0.3%) 🔴
prop-attributes brotli 20,224 20,255 +31 (+0.2%) 🔴
context raw 75,147 75,279 +132 (+0.2%) 🔴
context gzip 25,196 25,215 +19 (+0.1%) 🔴
context brotli 22,786 22,884 +98 (+0.4%) 🔴
hydrate-root raw 96,114 96,169 +55 (+0.1%) 🔴
hydrate-root gzip 32,328 32,324 −4 (−0.0%) 🟢
hydrate-root brotli 28,834 28,850 +16 (+0.1%) 🔴
deferred-hydration raw 180,118 180,283 +165 (+0.1%) 🔴
deferred-hydration gzip 58,700 58,748 +48 (+0.1%) 🔴
deferred-hydration brotli 51,291 51,326 +35 (+0.1%) 🔴
hydrate-frame raw 340,522 340,595 +73 (+0.0%) 🔴
hydrate-frame gzip 109,349 109,375 +26 (+0.0%) 🔴
hydrate-frame brotli 95,054 94,960 −94 (−0.1%) 🟢
suspense-transition raw 119,986 120,059 +73 (+0.1%) 🔴
suspense-transition gzip 39,214 39,222 +8 (+0.0%) 🔴
suspense-transition brotli 34,862 34,864 +2 (+0.0%) 🔴
component-owned-effects raw 61,227 61,359 +132 (+0.2%) 🔴
component-owned-effects gzip 20,722 20,777 +55 (+0.3%) 🔴
component-owned-effects brotli 18,872 18,923 +51 (+0.3%) 🔴
descriptor-children raw 166,432 166,511 +79 (+0.0%) 🔴
descriptor-children gzip 54,004 54,012 +8 (+0.0%) 🔴
descriptor-children brotli 47,999 47,968 −31 (−0.1%) 🟢
binding-hooks raw 70,453 70,585 +132 (+0.2%) 🔴
binding-hooks gzip 24,047 24,089 +42 (+0.2%) 🔴
binding-hooks brotli 21,806 21,863 +57 (+0.3%) 🔴
split-shell raw 391,403 391,586 +183 (+0.0%) 🔴
split-shell gzip 127,467 127,530 +63 (+0.0%) 🔴
split-shell brotli 111,069 111,159 +90 (+0.1%) 🔴
split-shell-runtime raw 316,020 316,203 +183 (+0.1%) 🔴
split-shell-runtime gzip 101,596 101,663 +67 (+0.1%) 🔴
split-shell-runtime brotli 87,802 87,897 +95 (+0.1%) 🔴
binding-base-ui-vite raw 176,955 177,380 +425 (+0.2%) 🔴
binding-base-ui-vite gzip 57,602 57,722 +120 (+0.2%) 🔴
binding-base-ui-vite brotli 51,063 51,198 +135 (+0.3%) 🔴
binding-base-ui-esbuild raw 198,369 198,853 +484 (+0.2%) 🔴
binding-base-ui-esbuild gzip 66,596 66,733 +137 (+0.2%) 🔴
binding-base-ui-esbuild brotli 58,895 59,000 +105 (+0.2%) 🔴
binding-radix-vite raw 176,391 176,470 +79 (+0.0%) 🔴
binding-radix-vite gzip 57,263 57,261 −2 (−0.0%) 🟢
binding-radix-vite brotli 50,749 50,735 −14 (−0.0%) 🟢
binding-radix-esbuild raw 197,857 197,995 +138 (+0.1%) 🔴
binding-radix-esbuild gzip 66,299 66,326 +27 (+0.0%) 🔴
binding-radix-esbuild brotli 58,612 58,537 −75 (−0.1%) 🟢
binding-mantine-hooks-vite raw 68,743 68,875 +132 (+0.2%) 🔴
binding-mantine-hooks-vite gzip 23,485 23,532 +47 (+0.2%) 🔴
binding-mantine-hooks-vite brotli 21,326 21,362 +36 (+0.2%) 🔴
binding-mantine-hooks-esbuild raw 77,574 77,706 +132 (+0.2%) 🔴
binding-mantine-hooks-esbuild gzip 27,501 27,537 +36 (+0.1%) 🔴
binding-mantine-hooks-esbuild brotli 24,883 24,905 +22 (+0.1%) 🔴
binding-apollo-client-vite raw 321,565 321,697 +132 (+0.0%) 🔴
binding-apollo-client-vite gzip 100,573 100,583 +10 (+0.0%) 🔴
binding-apollo-client-vite brotli 88,889 88,970 +81 (+0.1%) 🔴
binding-apollo-client-esbuild raw 350,228 350,360 +132 (+0.0%) 🔴
binding-apollo-client-esbuild gzip 113,572 113,604 +32 (+0.0%) 🔴
binding-apollo-client-esbuild brotli 100,261 100,202 −59 (−0.1%) 🟢
binding-usehooks-ts-vite raw 69,525 69,657 +132 (+0.2%) 🔴
binding-usehooks-ts-vite gzip 23,745 23,799 +54 (+0.2%) 🔴
binding-usehooks-ts-vite brotli 21,553 21,579 +26 (+0.1%) 🔴
binding-usehooks-ts-esbuild raw 78,342 78,474 +132 (+0.2%) 🔴
binding-usehooks-ts-esbuild gzip 27,742 27,785 +43 (+0.2%) 🔴
binding-usehooks-ts-esbuild brotli 25,071 25,108 +37 (+0.1%) 🔴

40 other measured values are unchanged.

@trueadm
trueadm marked this pull request as ready for review October 15, 2026 13:07

@trueadm trueadm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks. CI is green and the provider work controls in the body match. My concern is the same as on #2083: next is size-focused, and the benchmark report (run 38741497516) shows bytes going up with no measured speed-up.

  • Size (gzip):
    • js-framework tsrx +40 B (fw +39);
    • todo +45, chat +31, weather +16;
    • bindings +67.
  • Speed: every js-framework operation is within noise.

Could you add a benchmark that shows what the shared records save? The memo-wall provider-scope bench from #2073 could work, for example, measuring allocations or time for N direct readers under one provider, before and after. Without that, the trade is bytes on every app for a saving we can't see.

This change is also larger than it looks. It touches cached-context restamping, deferred-hydration activation records and DevTools unwrapping. If you keep it:

  • add a hydration test where a deferred island's direct reader sees a provider value change before and after activation;
  • add a check that DevTools still shows the raw provider value.

Reviewed with Claude Code

@domgan-oai

Copy link
Copy Markdown
Contributor Author

@trueadm Following up on your review: I ran the existing memo-wall workload on current head ae2367930 against its merge base ee7d52073 with 1,000 direct readers per wall, 10 provider changes per sample, and 18 alternating Chromium pairs. Owning-provider updates measured 12.7–24.3% faster across the six provider/wall combinations. Each sample preserved 10,000 owning-reader renders, zero unrelated renders, correct values, and node identity. Three of 12 baseline/baseline controls were asymmetric, so the exact percentages are not fully attributable; this measures update time, not allocations or a general app speedup.

The requested deferred-reader regression and raw DevTools-value regression are in the current head. The tradeoff remains real: the current benchmark reports +43 B TSRX and +119 B JSX full-JavaScript gzip, with all 64 work counters unchanged and no broad timing verdict. The full targeted methodology and results are in the PR description; current-head CI is green.

@trueadm trueadm closed this Oct 15, 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