-
Notifications
You must be signed in to change notification settings - Fork 865
perf(store): skip force-materialization in child CacheMultiStore creation #2839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
pdrobnjak
wants to merge
1
commit into
perf/skip-db-cachekv-child-cms
Choose a base branch
from
perf/skip-force-materialize-child-cms
base: perf/skip-db-cachekv-child-cms
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
perf(store): skip force-materialization in child CacheMultiStore creation #2839
pdrobnjak
wants to merge
1
commit into
perf/skip-db-cachekv-child-cms
from
perf/skip-force-materialize-child-cms
Conversation
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
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## perf/skip-db-cachekv-child-cms #2839 +/- ##
===================================================================
+ Coverage 56.80% 58.90% +2.10%
===================================================================
Files 2070 402 -1668
Lines 168450 36953 -131497
===================================================================
- Hits 95688 21769 -73919
+ Misses 64269 12954 -51315
+ Partials 8493 2230 -6263
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…tion Remove force-materialization of all lazy parent stores when creating child CacheMultiStore instances. Instead, merge both materialized stores and lazy storeParents into the child's storeParents map. This is safe because: - Materialized stores: child wraps them, Write() propagates correctly - Lazy stores: parent has no cachekv yet, so no stale cache. Child wraps the raw parent directly, and parent's eventual cachekv will read through and see child's writes. Key changes: - Replace Lock with RLock (no parent mutations needed) - Skip ensureStoreLocked/ensureGigaStoreLocked loops - Merge both stores and storeParents from parent into child - Pre-size stores/gigaStores maps to avoid growth in SetKVStores Expected savings: ~13 GB allocs/30s from cachekv.NewStore calls that were either immediately replaced by OCC SetKVStores or never accessed by nested EVM Snapshots (which touch 3-5 of ~20 stores per level). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8b30fb3 to
8a05681
Compare
7ab465a to
4c13c26
Compare
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
Stack
4/13 — depends on perf/skip-db-cachekv-child-cms
🤖 Generated with Claude Code