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 f79fe58
Browse filesBrowse the repository at this point in the historyBrowse files
Optimistic write engine detaches from the core floor: override writes,
lane routing/suspension, stashed-optimistic reads, transition-completion
blockage and optimistic-node resolution move to core/optimistic.ts behind
14 nullable GlobalQueue hooks, installed by verdict.ts (companions are
optimistic nodes) and at first createOptimistic/createOptimisticStore
call. Core call sites guard on state only the engine creates; the A17
override-is-the-value read return stays inline. Differential smoke is
byte-identical baseline vs hooked.
createLoadingBoundary's hydration-resume machinery installs through the
existing enableHydration() seam (same dispatcher pattern as the other
hydrated overrides), so CSR bundles shake it; hydrate() opt-in costs
+43 min bytes.
Measured (esbuild, minify, mangle-props ^_, gzip -9):
- core floor from src: 20,404/8,248 -> 18,921/7,683 min/gz
- plain-store subset: 33,740/13,039 -> 32,230/12,445
- minimal app from published dist: 29,081/11,461 -> 27,570/10,866
- CSR app using <Loading>: -2,469 min / -899 gz (controlled fixture)
- full flat bundle: +889 min hook tax (chunked prod dist unaffected)
Tree-shake guard extended: optimistic.ts must be absent from floor and
plain-store fixtures, present with createOptimistic; floor ceiling
tightened to 19.5 KB.
Co-Authored-By: Claude Fable 5 <[email protected]>
Pay-for-use tree-shaking, phase 2 (#2883). The optimistic write engine (override writes, lane routing/suspension, stashed-optimistic reads, transition-completion blockage, optimistic-node resolution) moves out of `core.ts`/`scheduler.ts`/`lanes.ts` into a new internal `optimistic` module behind fourteen nullable `GlobalQueue` hooks, installed by the verdict layer and at first `createOptimistic`/`createOptimisticStore` call. Every core call site is gated on state only the engine can create (an `_overrideValue` slot, a live lane, a non-empty optimistic batch), and the A17 override-is-the-value read path stays inline in core. On the `solid-js` side, `createLoadingBoundary`'s hydration-resume machinery (boundary triggers, resume scheduling, asset-failure reporting, snapshot capture) now installs through the existing `enableHydration()` seam, so client-only apps stop shipping it.
7
+
8
+
Measured (esbuild, minify, `_`-prop mangling, gzip -9): core floor 8.2 → 7.7 KB gzip; plain-store subset 13.0 → 12.4 KB; minimal app from published dist 11.5 → 10.9 KB; a CSR app using `<Loading>` drops a further ~0.9 KB gzip; opting into `hydrate()` costs +43 min bytes. Cumulative with phase 1, the minimal-app floor is down ~14% and the signals floor ~13.5% with no behavioral change — differential smoke runs are byte-identical and the full Tier-A suite passes unchanged.
0 commit comments