Reduce memory allocations by using bitset instead of sync.map#2284
Reduce memory allocations by using bitset instead of sync.map#2284
Conversation
PR SummaryMedium Risk Overview Written by Cursor Bugbot for commit d52f1fb. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a120a755c
ℹ️ 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".
|
We're already working on this performance improvement here: #2235 |
Roaring bitmap has a suspected concurrency issue under RWMutex that causes spurious BytesNotAvailableError (EIO) in CI. Switch the default from Roaring to bits-and-blooms/bitset which is proven reliable (Joe's PR #2284 passes CI with it). - Add BitsAndBlooms wrapper implementing atomicbitset.Bitset - Default ("") now creates BitsAndBlooms (needs dirtyMu, like Roaring) - "atomic" still uses Flat/Sharded (lock-free, best perf) - "roaring" still available via feature flag - Add cache-pattern test mirroring real chunk fetch/read sequences Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
-> #2284 (comment), will work with that |

AI results via benchtest: