Skip to content

perf: hollow CMS for OCC prepareTask#2914

Open
pdrobnjak wants to merge 1 commit intomainfrom
pd/perf-hollow-cms-occ
Open

perf: hollow CMS for OCC prepareTask#2914
pdrobnjak wants to merge 1 commit intomainfrom
pd/perf-hollow-cms-occ

Conversation

@pdrobnjak
Copy link
Contributor

Summary

  • Adds CacheMultiStoreForOCC to cachemulti.Store that creates a hollow CMS where stores are populated directly from VersionIndexedStores via handler functions
  • The OCC scheduler's prepareTask now uses this instead of CacheMultiStore() + SetKVStores() + SetGigaKVStores(), skipping creation of ~20 intermediate cachekv instances that were immediately discarded
  • Eliminates ~10 GB of allocations in the prepareTask path per 120s benchmark run
  • Falls back to the original CacheMultiStore + SetKVStores path when the multistore doesn't implement the occPreparer interface

Test plan

  • go test ./sei-cosmos/store/cachemulti/... — all pass
  • go test ./giga/deps/xevm/state/... — all pass
  • go build ./... — builds clean
  • Benchmark: GIGA_SUPPRESS_COSMOS_EVENTS=true benchmark/benchmark-compare.sh baseline=7d7ab4f99 candidate=7d2cd92ee
    • Baseline: Median 6985, Avg 6836
    • Candidate: Median 7000, Avg 6927
    • Alloc diff: -10.3 GB cumulative in prepareTask, -6.8 GB in cachekv.NewStore

🤖 Generated with Claude Code

CacheMultiStoreForOCC creates a hollow CMS where stores are populated
directly from VersionIndexedStores, skipping creation of intermediate
cachekv instances that would be immediately discarded by SetKVStores.

Cherry-picked from de0dd9c, adapted for this branch (no fast store),
GC tuning changes excluded.

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

github-actions bot commented Feb 18, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 18, 2026, 1:52 PM

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 75.67568% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.24%. Comparing base (07025b9) to head (bc3f63e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
giga/deps/tasks/scheduler.go 55.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2914      +/-   ##
==========================================
+ Coverage   57.22%   57.24%   +0.01%     
==========================================
  Files        2094     2099       +5     
  Lines      171956   172439     +483     
==========================================
+ Hits        98400    98707     +307     
- Misses      64739    64871     +132     
- Partials     8817     8861      +44     
Flag Coverage Δ
sei-chain 52.72% <75.67%> (-0.02%) ⬇️
sei-cosmos 48.18% <0.00%> (-0.02%) ⬇️
sei-db 68.72% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-cosmos/store/cachemulti/store.go 75.15% <100.00%> (+0.15%) ⬆️
giga/deps/tasks/scheduler.go 88.92% <55.00%> (-2.69%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant

Comments