Repository navigation
Replies: 1 comment
|
Thanks — the read amplification is real and your reasoning about it is close. I traced it against the Where the whole-log read actually lives
Two skip conditions guard that loop ( One correction: the startup list cannot reach this loop
The reconcile runs only from That Why it exhausts the heap rather than just being slowPer cold session,
The The fingerprint in (4) is dead work on this path: change detection for persisted entries is Why reading only the first frame does not work as the fixThe cold read exists to build FTS documents, and those come from What I would change insteadRanked by cost:
What I would like to know to narrow the trigger
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
The desktop host (Electron 44.7.0 /
dsh-desktopruntime0.2.1-rc.2) repeatedly crashes withFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memoryduring startup session projection, then the parent respawn loop surfaces as the GUI error "应用无法启动或已意外停止". The crash is triggered purely by accumulated session-log size, not by any single conversation.Root cause
At cold start,
materializePersistenceSnapshotsindsh/node_modules/@deepseek-ai/dsh-session-query-sqlite/lib/index.jsiteratespersisted.values()and for every session callsreadColdSessionLog(...), which doeshandle.read(0, void 0)(full read of the entire session log) indsh/node_modules/@deepseek-ai/dsh-session-query/lib/index.js.session.v4.jsonl.zstd(multi-frame zstd JSONL): the first frame is the session header/card, later frames are event bodies.Suggested fix (matches the intended UX)
Make startup projection read only the first frame (header/card) per session, and lazily load full event bodies when a session is actually opened (unload on close). The building blocks already exist in-repo:
readFirstZstdLine/readFirstLineindsh/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.jsalready read only the header frame.This keeps conversation cards visible at startup while full content stays unloaded until viewed — exactly the "card stays, content loads on demand" behavior, and it permanently removes the OOM loop as session history grows.
Repro environment
@deepseek-ai/dsh-desktop 0.2.1-rc.2)FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory; respawn atlib/main.js:3724:64All reactions