Skip to content
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

Improve performance of BlockChain<T>.FindNextHashes() #1676

Merged
merged 3 commits into from Dec 20, 2021

Conversation

longfin
Copy link
Member

@longfin longfin commented Dec 16, 2021

This PR improves performance of BlockChain<T>.FindNextHashes() through two bellow adjustments.

  1. Removed _rwlock from BlockChain<T>.FindNextHashes() because it has already protected by another lock on BlockChain<T>.FindBranchpoint().
  2. Added a memory cache for RocksDBStore.IterateIndexes() to speed up iterative lookups.

@longfin longfin self-assigned this Dec 16, 2021
@longfin longfin force-pushed the feature/improve-store-iterateindex branch 2 times, most recently from 2d158b0 to 6f51e94 Compare December 16, 2021 16:32
@longfin longfin force-pushed the feature/improve-store-iterateindex branch from 6f51e94 to c2af9bb Compare December 16, 2021 16:38
@longfin longfin marked this pull request as ready for review December 16, 2021 16:39
@longfin longfin added the storage Related to storage (Libplanet.Store) label Dec 16, 2021
riemannulus
riemannulus previously approved these changes Dec 17, 2021
Co-authored-by: Say Cheong <greymistcube@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage Related to storage (Libplanet.Store)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In-memory cache RocksDBStore.IterateIndexes()
4 participants