Replies: 1 comment
|
Update after upgrading to
Keeping this open since the suggested directions (cache with explicit invalidation, a lightweight header index, or a bounded projection) still apply. Happy to help test a patch. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Typing
@in the Web GUI triggers session autocomplete that enumerates the entire persisted session corpus on every keystroke, with no caching or bounds. Latency grows linearly with session count; at ~9.5k sessions it becomes hundreds of ms to seconds per keystroke and competes with the agent loop on Node's single thread.Environment
@deepseek-ai/dsh@0.1.1-rc.2(jsonl session persistence, default)Failure path
Every
@input callsremote.sessionReferenceResolver.candidates(dsh-client-ui-reference):dsh-session-reference→sessionQuery.listSessions→SessionPersistence.listArtifacts(dsh-session-persistence-jsonl), which for every stored session does:statexistence checks,readFirstZstdLine) to parse the header line,readTitleSnapshotsis called for all records, not just thecandidateLimitsubset.Reproduction
@keystroke then decompresses ~9.5k zstd files (~10 MB) synchronously inside the host process, serialized with the agent loop.Key contrast
maxEntries(default 10000) and excludes.git/node_modules.candidateLimit(default 50) only trims returned results, never the scan itself.Suggested directions
@completion from a bounded projection (e.g. only most-recent N sessions per project) without a full scan.Workaround
Bulk-archiving old/empty sessions out of
~/.dsh/sessionsrestores sub-second autocomplete;@"(quoted) file references skip session candidates entirely in the current client code.All reactions