Skip to content

Conversation

@pdrobnjak
Copy link
Contributor

@pdrobnjak pdrobnjak commented Feb 11, 2026

Summary

Skip unnecessary db-backed CacheKV store creation when building child CacheMultiStore instances

@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:20 PM

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.80%. Comparing base (cc0301f) to head (8a05681).

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           perf/stack-base    #2838       +/-   ##
====================================================
- Coverage            68.72%   56.80%   -11.92%     
====================================================
  Files                    5     2070     +2065     
  Lines                  454   168450   +167996     
====================================================
+ Hits                   312    95688    +95376     
- Misses                 113    64269    +64156     
- Partials                29     8493     +8464     
Flag Coverage Δ
sei-chain 40.91% <100.00%> (?)
sei-cosmos 48.17% <76.19%> (?)
sei-db 68.72% <ø> (ø)
sei-tendermint 58.75% <ø> (?)

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 71.13% <100.00%> (ø)

... and 2064 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.

When creating a child CMS via newCacheMultiStoreFromCMS (called from
EVM Snapshot and OCC prepareTask), the db CacheKV was created but
never accessed — all store access goes through module store keys.

Build the child CMS directly instead of routing through NewFromKVStore,
which eliminates:
- The unused db CacheKV allocation (~10.7 GB / 30s in profiles)
- One intermediate map copy (stores → storeParents)

Also adds nil-safety for db in Write() since child CMS now has db=nil.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pdrobnjak pdrobnjak force-pushed the perf/optimize-updatereadset-alloc branch from b97b114 to de1b10e Compare February 11, 2026 13:19
@pdrobnjak pdrobnjak force-pushed the perf/skip-db-cachekv-child-cms branch from 8b30fb3 to 8a05681 Compare February 11, 2026 13:19
Base automatically changed from perf/optimize-updatereadset-alloc to perf/hybrid-syncmap-rwmutex February 11, 2026 13:19
Base automatically changed from perf/hybrid-syncmap-rwmutex to perf/lazy-cachemultistore February 11, 2026 13:19
@pdrobnjak pdrobnjak changed the base branch from perf/lazy-cachemultistore to perf/stack-base February 11, 2026 13:31
@pdrobnjak pdrobnjak changed the title perf(store): skip db CacheKV in child CacheMultiStore creation perf(store): skip db CacheKV in child CacheMultiStore creation Feb 11, 2026
@pdrobnjak pdrobnjak marked this pull request as draft February 11, 2026 14:14
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