Repository navigation
feat(runtime): install hydration-time insert/event behaviors from hydrate() - #544
Merged
Merged
Conversation
…rate() insert()'s initial claim + swapped-region reclaim, insertExpression's hydration gate, and eventHandler's replay dedup move into a runtime slot assigned by hydrate(), so CSR bundles shake the bodies. Rollup-class bundlers already folded these paths (sharedConfig literal tracking) and measure byte-identical; esbuild-class bundlers drop ~450 min / ~194 gz. installHydrationRuntime() is exported for tests/embedders that simulate mid-hydration state without entering through hydrate(). Co-Authored-By: Claude Fable 5 <[email protected]>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
ryansolid
added a commit
to solidjs/solid
that referenced
this pull request
Jul 15, 2026
Rollup literal-tracks never-written module state and folds the dead branches; esbuild cannot, so these paths shipped only to esbuild-class consumers. Restructured so both bundlers land in the same place, all Rollup-neutral by measurement: - external-source wiring (computed setup + untrack) moves behind GlobalQueue hooks whose installs mirror enableExternalSource()'s config liveness exactly (installed on enable, removed on reset) - onlyMarkPending moves from async.ts into affects.ts behind the activeAffectsMarks-gated hook (mark-transparency is affects-only) - the optimistic-store settle loop moves inside the store-side hook (_clearOptimisticStores takes the batch; scheduler keeps a size-guarded call) esbuild minimal app: -77 gz from these + -194 gz from the companion dom-expressions hydration-hook change (ryansolid/dom-expressions#544). Co-Authored-By: Claude Fable 5 <[email protected]>
ryansolid
added a commit
to solidjs/solid
that referenced
this pull request
Jul 15, 2026
…ups (#2883) (#2890) * feat(signals,solid): pay-for-use tree-shaking phase 3 (#2883) Mechanical cleanups chosen by the phase-3 cost/benefit audit (delegation seam and snapshot seam rejected by design ruling / weight gate): signals: - dedupe effect re-enqueue block (4 copies) + zombie/dirty queue ternaries into enqueueSub/queueFor; hot write loop microbenched, no regression - _-prefix boundary/reveal internal method names so property mangling reaches them (verified internal-only) - trim prod error strings to diagnostic codes; dev keeps full sentences - stop stripping /*@__PURE__*/ from dist/prod: drop rollup-plugin-prettier from the prod tree (it deletes annotations), terser preserve_annotations in mangle-props.mjs, new scripts/check-pure.mjs fails the build if annotations vanish again solid-js client: - sharedConfig.getNextContextId installs from enableHydration(); defining it in the object literal retained context/error machinery in every CSR bundle (SharedConfig.getNextContextId now optional) - lazy()'s hydration-module lookup moves behind _lazyHydrationLookup, installed by enableHydration() - MockPromise: class static block defeated DCE in every client bundle; now a PURE-annotated factory packaging: unpkg/jsdelivr fields point at browser prod ESM (were CJS, browser-fatal on bare CDN URLs) Measured (esbuild, minify, mangle-props ^_, gzip -9): - minimal app: 27,570/10,870 -> 26,429/10,432 - CSR app (+Loading/lazy): 35,565/13,935 -> 32,067/12,601 (incl. DOMElements dedup propagating through rebuilt web runtime) - signals floor: 18,921/7,687 -> 18,539/7,515 - full bundle: 55,366/20,587 -> 54,587/20,315 (hook-tax clawback) Co-Authored-By: Claude Fable 5 <[email protected]> * feat(signals): close esbuild-shakeable gaps at the source level (#2883) Rollup literal-tracks never-written module state and folds the dead branches; esbuild cannot, so these paths shipped only to esbuild-class consumers. Restructured so both bundlers land in the same place, all Rollup-neutral by measurement: - external-source wiring (computed setup + untrack) moves behind GlobalQueue hooks whose installs mirror enableExternalSource()'s config liveness exactly (installed on enable, removed on reset) - onlyMarkPending moves from async.ts into affects.ts behind the activeAffectsMarks-gated hook (mark-transparency is affects-only) - the optimistic-store settle loop moves inside the store-side hook (_clearOptimisticStores takes the batch; scheduler keeps a size-guarded call) esbuild minimal app: -77 gz from these + -194 gz from the companion dom-expressions hydration-hook change (ryansolid/dom-expressions#544). Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
ryansolid
added a commit
that referenced
this pull request
Jul 15, 2026
…id#2883) Bundles import-subset fixtures from src/client.js with rxcore external (measuring only this package's tree-shaken contribution) and fails when gzip cost exceeds committed ceilings with ~5% headroom. The compiled-JSX core scenario excludes the hydrate()-installed runtime — the property #544 established and this guard keeps. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of solidjs/solid#2883 (last mile). The hydration-only behaviors reached from hot client paths —
insert()'s initial claim and swapped-region reclaim walk,insertExpression's hydration gate,eventHandler's replay dedup — move behind a nullablehydrationRtslot installed byhydrate().Measured on the minimal-app fixture with identical runtime bases (real package resolution, gzip -9):
sharedConfigobject-literal trackinginstallHydrationRuntime()is exported for tests/embedders that simulate mid-hydration state directly (the nested-roots replay spec now uses it).All 606 runtime tests pass.
🤖 Generated with Claude Code