Skip to content
This repository was archived by the owner on Aug 15, 2026. It is now read-only.

Releases: orangeofcarl0-sys/dsh-projection-warmup

v0.3.0 — chunked materialize for huge forks

Choose a tag to compare

@orangeofcarl0-sys orangeofcarl0-sys released this 15 Aug 18:11

The fix

Forking a huge session (60万+ events) crashed or OOM'd because encodeMaterializationeventLines = map(JSON.stringify).join() builds a single ~501MB string; 74万 events throws RangeError: Invalid string length (V8 ~512MB cap).

v0.3.0 patches JsonlSessionPersistence.encodeMaterialization (rc.6 signature-guarded) to emit one zstd frame per 50k events. Multi-frame output is natively decoded by dsh's scanZstdFrames, byte-compatible.

heap peak 74万 events
before 1572MB RangeError
after 1155MB safe

Why 'single session fine, fork breaks'

  • normal sessions persist incrementally (appendLines, small batches)
  • fork children persist via materialize (full seed) — the only path that serializes the whole log at once

Install

dsh plugin --profile web add github:orangeofcarl0-sys/dsh-projection-warmup

v0.2.0 — chunked warmup + fork backfill

Choose a tag to compare

@orangeofcarl0-sys orangeofcarl0-sys released this 15 Aug 17:41

What

  • chunked live-session warmup (default on): folds projection cells in chunks with setImmediate yields, writing them into the registry WeakMap so snapshot()/drive() hit warm cells — a 74万-event session drops from a 20-min cold fold to ~200ms.
  • fork child cache backfill (default on, zero-cost): fork children get projection cache rows written right after warmup, so abandoned forks never hit the full readFrom(0) coldSnapshot path.
  • disk cold-session backfill (default OFF): streaming parse+fold to write missing cache rows. Off by default because readRaw's sync zstd decode is not chunkable at plugin layer.

Install

dsh plugin --profile web add github:orangeofcarl0-sys/dsh-projection-warmup

Verified on dsh 0.1.0-rc.6 / Windows (tests: 19 asserts ALL PASS).