You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d0b9c91
Browse filesBrowse the repository at this point in the historyBrowse files
* 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]>
Pay-for-use tree-shaking, phase 3 (#2883) — mechanical cleanups selected by cost/benefit audit. Signals: the effect re-enqueue block (four copies) and zombie/dirty queue selection dedupe into shared `enqueueSub`/`queueFor` helpers (hot-path microbenched, no regression); boundary/reveal internal method names are `_`-prefixed so property mangling reaches them; production error strings trim to their diagnostic codes (dev builds keep full sentences); and the prod dist build stops stripping `/*@__PURE__*/` annotations — rollup-plugin-prettier is off the prod tree, terser re-emits annotations, and a new `check-pure` build guard fails the build if they ever vanish again. solid-js client: `sharedConfig.getNextContextId` and `lazy()`'s hydration-module lookup install from `enableHydration()` instead of shipping in every CSR bundle, and MockPromise's class static block (which defeated dead-code elimination in every client bundle) becomes a PURE-annotated factory. CDN `unpkg`/`jsdelivr` fields now point at browser production ESM instead of CommonJS files.
7
+
8
+
A last-mile pass closes part of the esbuild-vs-Rollup shaking gap at the source level (Rollup's literal tracking folds never-written state that esbuild retains): the external-source wiring in computed setup and `untrack` moves behind hooks that mirror `enableExternalSource()`'s config liveness, the affects-only `onlyMarkPending` read-path helper moves into the affects module, and the optimistic-store settle loop moves inside its store-side hook. All are Rollup-neutral by measurement.
9
+
10
+
Measured: minimal app 10.9 → 10.3 KB gzip under esbuild and **9.8 KB gzip / 9.0 KB brotli under Vite** (Solid's default toolchain — under the 10 KB mark); CSR app with `<Loading>`/`lazy` 13.9 → 12.6 KB; signals floor 7.7 → 7.4 KB; and the full-featured bundle *shrinks*~330 gzip bytes, recovering a third of the phase-1/2 hook indirection tax. Cumulative across all three phases the minimal app is down ~19% with all 1,941 tests across the affected packages passing unchanged.
0 commit comments