Skip to content

perf(store): remove dead sortedStore field from VersionIndexedStore#2849

Merged
pdrobnjak merged 1 commit intomainfrom
perf/remove-vis-sortedstore
Feb 11, 2026
Merged

perf(store): remove dead sortedStore field from VersionIndexedStore#2849
pdrobnjak merged 1 commit intomainfrom
perf/remove-vis-sortedstore

Conversation

@pdrobnjak
Copy link
Contributor

@pdrobnjak pdrobnjak commented Feb 11, 2026

Summary

Remove unused sortedStore field and its allocation from VersionIndexedStore.

The sortedStore *dbm.MemDB field in VersionIndexedStore was allocated in
the constructor (NewVersionIndexedStore) but never read or written
anywhere in the codebase. Each VIS instance allocated a full MemDB with
btree + FreeList — ~21 VIS per transaction × ~200K txs in 30s = ~4.2M
dead MemDB allocations.

Remove the field and its allocation entirely.

Results (M4 Max benchmark, diff vs previous):
- NewMemDB via VIS: 14.9 GB → 13.5 MB (eliminated)
- btree.NewFreeListG: 15.3 GB → ~4.3 GB (-11 GB)
- memclrNoHeapPointers CPU: 10.71s → 5.45s (-49%)
- TPS: 7,200-8,600 → 8,400-9,400 (median ~8,000 → ~9,000)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 11, 2026, 1:43 PM

@pdrobnjak pdrobnjak enabled auto-merge (squash) February 11, 2026 15:11
@pdrobnjak pdrobnjak requested a review from codchen February 11, 2026 15:11
@pdrobnjak pdrobnjak assigned arajasek and unassigned arajasek Feb 11, 2026
@pdrobnjak pdrobnjak requested a review from arajasek February 11, 2026 15:12
@pdrobnjak pdrobnjak merged commit a138aeb into main Feb 11, 2026
58 of 60 checks passed
@pdrobnjak pdrobnjak deleted the perf/remove-vis-sortedstore branch February 11, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments