perf: page_allocator for worker arenas + eager free + index shrink (#261)#263
Merged
justrach merged 1 commit intorelease/v0.2.57from Apr 13, 2026
Merged
perf: page_allocator for worker arenas + eager free + index shrink (#261)#263justrach merged 1 commit intorelease/v0.2.57from
justrach merged 1 commit intorelease/v0.2.57from
Conversation
Three changes to reduce RSS: 1. Back worker arenas with page_allocator instead of GPA — mmap pages are returned to OS immediately on arena deinit (no GPA retention) 2. Free each worker's arena right after committing its results instead of holding all workers' data simultaneously 3. shrinkPostingLists/shrinkAllocations on trigram + word indexes after scan to release ArrayList over-allocation Benchmark (openclaw, 13,867 files, cold search): v0.2.56 baseline: 3,678MB 5.82s PR#260 (content): 3,415MB 5.26s This PR: 3,361MB 5.64s (-8.6% RSS vs baseline) Recall: 52/52 — no false negatives The remaining ~3.3GB is genuinely live index data (trigram posting lists + word index hits). Further reduction needs flat array storage or compressed postings (tracked in #261). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Benchmark Regression ReportThreshold: 10.00%
|
justrach
added a commit
that referenced
this pull request
Apr 13, 2026
perf: page_allocator for worker arenas + eager free + index shrink (#261)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three optimizations to reduce RSS during and after cold indexing:
shrinkPostingLists()andshrinkAllocations()release ArrayList over-allocation on trigram and word indexesBenchmark (openclaw, 13,867 files, cold search)
Recall: 52/52 for
handleRequest— no false negatives.The remaining ~3.3GB is genuinely live index data. Further reduction tracked in #261 (needs flat array storage or compressed postings).
Test plan
🤖 Generated with Claude Code