Skip to content

perf: memory fixes for node/fast-node caches and pruning - #1167

Open
rit3sh-x wants to merge 1 commit into
cosmos:masterfrom
rit3sh-x:perf/memory-fixes
Open

rit3sh-x wants to merge 1 commit into
cosmos:masterfrom
rit3sh-x:perf/memory-fixes

Conversation

@rit3sh-x

@rit3sh-x rit3sh-x commented Nov 6, 2026

Copy link
Copy Markdown

Summary

Reduces IAVL cache memory usage and prevents pruning from polluting the node cache.

  • Value size limit: Adds CacheValueSizeLimitOption to skip caching leaves and fast nodes with values larger than the configured limit. Oversized fast nodes are also removed from the cache.
  • Fast node cache size: Adds FastNodeCacheSizeOption to configure the fast-node cache capacity. Defaults remain unchanged (100,000 entries).
  • Pruner cache hygiene: Evicts deleted nodes from the cache, avoids refreshing LRU order or caching misses during pruning, and evicts entries before updating cached node nonces.

Testing

  • make legacydump && go test ./... passes.
  • Targeted race tests for pruning, caches, fast nodes, legacy, and nodedb pass.
  • Existing iterator concurrency race reports are unchanged from master.

@rit3sh-x
rit3sh-x requested a review from a team as a code owner November 6, 2026 19:46
@greptile-apps

greptile-apps Bot commented Nov 6, 2026

Copy link
Copy Markdown

This PR does not match any of the 1 configured review trigger rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant