Skip to content

Commit 3e3335e

Browse files
ryansolidClaude via Cursor
andcommitted
chore(size): caps for the lazy memo relink (#3555)
Measured on the tree rebased over #3586: `+ createStore` 16,903 B (16.90 -> 16.95 KB), `+ isPending/latest` 12,479 B (12.45 -> 12.50 KB), the simple-app floor 12,510 B (12.50 -> 12.55 KB) and the every-store- family hydrating app 30,901 B (30.90 -> 30.95 KB), each against `next`'s 16,891 / 12,428 / 12,489 / 30,874. The core floor stays under its cap at 9,685 B (+10 B). Source: linkChild on reawaken, the freeze branch in prepareComputed, and disposeChildren's post-disposal sibling read, +63 B minified in the signals core (26,054 -> 26,117); the rest is mangler/brotli layout. Ledger notes on each entry. Also: the changeset says "owned by its owner again" (was "its root"). Co-authored-by: Claude via Cursor <[email protected]>
1 parent 7b84d8c commit 3e3335e

2 files changed

Lines changed: 40 additions & 5 deletions

File tree

‎.changeset/dormant-memo-relink-on-reawaken.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@solidjs/signals": patch
33
---
44

5-
A lazy memo (`createMemo(fn, { lazy: true })`) that went dormant and was later read again is owned by its root again: the root's `dispose()` tears it down and its siblings are no longer orphaned by the memo's next dormancy (#3554). Reading a dormant lazy memo after its owner has been disposed now returns the last committed value without reviving it.
5+
A lazy memo (`createMemo(fn, { lazy: true })`) that went dormant and was later read again is owned by its owner again: the owner's `dispose()` tears it down and its siblings are no longer orphaned by the memo's next dormancy (#3554). Reading a dormant lazy memo after its owner has been disposed now returns the last committed value without reviving it.

‎scripts/size/.size-limit.js‎

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,16 @@ module.exports = [
320320
// swap's lane-channel notification). The DEV-only after-the-fact
321321
// LOADING_ON_OUTSIDE_HOLD sweep is 0 B here (its own shaken function).
322322
// Boundaries are not retained by this floor.
323+
// Lazy memo relink + dead-owner freeze (#3555, 2026-09-22): 9,685 B
324+
// against `next`'s 9,675 (+10 B; 15 B under the cap, which is unchanged).
325+
// Core-retained: `linkChild` (the one head link shared by createOwner,
326+
// setupComputedNode and prepareComputed's auto-dispose reawaken, with its
327+
// zombie guard), the freeze branch in prepareComputed (a dormant node
328+
// read under a disposed owner drops AUTO_DISPOSE and returns instead of
329+
// recomputing, #3024), and disposeChildren detaching the chain before
330+
// its loop, pointing each drained child's prev at itself and reading its
331+
// next sibling after its disposal. +63 B minified in the in-package
332+
// floor (26,054 -> 26,117); the rest is mangler/brotli layout.
323333
limit: "9.70 KB",
324334
modifyEsbuildConfig
325335
},
@@ -629,7 +639,13 @@ module.exports = [
629639
// the core floor is 0 B, and isPending/latest's +31 B, the every-store-
630640
// family app's +32 B and CSR observe's +11 B are the prop mangler's
631641
// short-name assignment and the brotli layout that follows.
632-
limit: "16.90 KB",
642+
// Lazy memo relink + dead-owner freeze (#3555, 2026-09-22): 16.90 ->
643+
// 16.95 KB, measured at 16,903 B against `next`'s 16,891 (+12 B):
644+
// linkChild on reawaken, the freeze branch in prepareComputed, and
645+
// disposeChildren's post-disposal sibling read (+63 B minified in the
646+
// signals core, see the core floor note); the rest is mangler/brotli
647+
// layout. 0 B in the store.
648+
limit: "16.95 KB",
633649
modifyEsbuildConfig
634650
},
635651
{
@@ -801,7 +817,14 @@ module.exports = [
801817
// 12,393 (+38 B), rebased over #3577 — the flush's pre-verdict
802818
// `checkBoundaryChildren(this, true)` walk and heap re-run (core;
803819
// boundaries are not retained here).
804-
limit: "12.45 KB",
820+
// Lazy memo relink + dead-owner freeze (#3555, 2026-09-22): 12.45 ->
821+
// 12.50 KB, measured at 12,479 B against `next`'s 12,428 (+51 B):
822+
// linkChild on reawaken, the freeze branch in prepareComputed, and
823+
// disposeChildren's post-disposal sibling read (+63 B minified in the
824+
// signals core, see the core floor note); the verdict layer is
825+
// untouched, so the +41 B over the core floor's own delta is
826+
// mangler/brotli layout over the larger bundle.
827+
limit: "12.50 KB",
805828
modifyEsbuildConfig
806829
},
807830
{
@@ -929,7 +952,13 @@ module.exports = [
929952
// flush path every app retains (see the `+ createStore` note).
930953
// rc.10: on follows the frame (#3540): 12,473 B against `next`'s 12,472
931954
// (+1 B) — the core floor's drain move; within the cap.
932-
limit: "12.50 KB",
955+
// Lazy memo relink + dead-owner freeze (#3555, 2026-09-22): 12.50 ->
956+
// 12.55 KB, measured at 12,510 B against `next`'s 12,489 (+21 B):
957+
// linkChild on reawaken, the freeze branch in prepareComputed, and
958+
// disposeChildren's post-disposal sibling read (+63 B minified in the
959+
// signals core, see the core floor note); the rest is mangler/brotli
960+
// layout. 0 B in solid and web.
961+
limit: "12.55 KB",
933962
modifyEsbuildConfig
934963
},
935964
{
@@ -1369,7 +1398,13 @@ module.exports = [
13691398
// (+105 B) — the same core + boundaries + solid deltas as the entry
13701399
// above; brotli's context over the larger bundle lands 20 B differently
13711400
// from the entry above's -3 B. 0 B in the store engine.
1372-
limit: "30.90 KB",
1401+
// Lazy memo relink + dead-owner freeze (#3555, 2026-09-22): 30.90 ->
1402+
// 30.95 KB, measured at 30,901 B against `next`'s 30,874 (+27 B):
1403+
// linkChild on reawaken, the freeze branch in prepareComputed, and
1404+
// disposeChildren's post-disposal sibling read (+63 B minified in the
1405+
// signals core, see the core floor note); the rest is mangler/brotli
1406+
// layout. 0 B in the store engine, solid, or web.
1407+
limit: "30.95 KB",
13731408
modifyEsbuildConfig
13741409
},
13751410
{

0 commit comments

Comments
 (0)