Reduce MCP snapshot RSS#329
Conversation
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94c9e0e92a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| content_gop.key_ptr.* = path; | ||
| content_gop.value_ptr.* = content; | ||
| const content_cache_limit: u32 = 1000; | ||
| const should_cache = explorer.outlines.count() <= content_cache_limit; |
There was a problem hiding this comment.
Preserve rebuildable content when capping snapshot cache
This cap drops raw content for files after the first 1000 during fast snapshot restore, but Explorer.searchWord rebuilds the in-memory word index from explorer.contents when disk index loading fails. In repos larger than 1000 files where word.index is missing/unreadable (for example on a fresh machine with only codedb.snapshot), the rebuild becomes partial yet is treated as complete, so codedb_word and identifier-style search paths silently miss hits in uncached files.
Useful? React with 👍 / 👎.
What changed
codedb snapshotpersist a valid disk word index by streaming source files when the in-memory word index was skipped for a low-memory scan.codedb_searchqueries so exact/prefix searches stay fast without keeping raw contents resident.Validation
zig build testzig build