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 1a3f87f
Browse filesBrowse the repository at this point in the historyBrowse files
signals: benchmarks measure the built package; the fold queue's pre-batch record (CodSpeed follow-up to #3774) (#3776)
* bench(signals): benchmarks measure the built package
In benchmark mode the benches' src/index.js import is aliased to the dist
entry of the selected tier (SIGNALS_TIER, default prod for benchmarks) and
the dist is externalized so Node links it natively — the prod build
preserves modules, and vite-node's SSR transform would turn its
cross-module imports back into the namespace-object property loads the
alias exists to take out of the measurement. SIGNALS_BENCH=source keeps a
from-source loop for local iteration. A missing or stale dist fails the
run with the rebuild instruction instead of timing code not under test.
CodSpeed already builds before benching; its first run after this
re-baselines every signals bench. Plan sec. 43.1.
Co-authored-by: Cursor <[email protected]>
* store: the fold queue records the pre-batch backing beside the target
The weak map keyed by target kept every container's last adopted-away
backing alive until its next adoption: for a keyed reconcile the previous
tick's whole tree promoted out of the nursery every tick (saturated
listened-paths +15%, reconcile tree +10-13% over next on the dist, all of
it GC); for a store adopted once, the old tree for the store's lifetime.
The record is now foldOlds, parallel to foldList: t.v at queueFold for
every queued target, released with the drain. That one record is the
fold's base in every case (draft, eager adoption, mid-batch privatization,
draft over an adopted raw), so privatizedOlds, draftedAdoptions and the
adoption flag go. The target has no slot for it (ARRAY SHAPE RULE), so the
by-target lookups (preBatch: a node born onto an open staging, a
committed-frame read of a node-less staging, a park) index the list
through a map built on first use per batch; the drain never builds it.
After, on the dist vs next: tree reverse +3%, shuffle +4%, saturated
+1.5%, sparse parity; fresh stores / owned backings / enumerate / storebench
unchanged; GC totals identical to the head. Signals 4894/0, web 1132/0,
solid 819/0; every size cap holds. Plan sec. 43.2.
Co-authored-by: Cursor <[email protected]>
* bench(signals): projection-root-write loads under the dev tier
The warm-up store write sat inside createRoot, where the dev tier's
owned-scope write check throws — the file failed to load under
SIGNALS_TIER=dev, so CodSpeed compared its prod-dist values against a
stale base (two of the four 'regressions' on #3776). Moved outside the
root. Plan sec. 43.1 records the first dist-mode CodSpeed run.
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: Cursor <[email protected]>
Store fold queue: the pre-batch committed backing is recorded beside the queued target and released with the drain. The weak map it replaces kept every container's last adopted-away backing alive until its next adoption — for a keyed reconcile, the previous tick's whole tree promoted out of the nursery every tick (the saturated listened-paths and reconcile-tree shapes ran 10–15% over `next` on that alone); for a store adopted once, the old tree for the store's lifetime. The per-batch side maps for mid-batch privatizations and drafts over adoptions fold into the same record.
0 commit comments