Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix performance issue in block_uniquer cleanup. #4326

Merged

Conversation

clemahieu
Copy link
Contributor

Random item selection is now done based on buckets of unordered_map rather than iterating a random number of values. Previously this was doing a linear scan of entries in nano::block_uniquer::blocks which had a significant performance impact.

@clemahieu clemahieu force-pushed the fix_block_uniquer_linear_scan branch 2 times, most recently from e86299d to 1bb5ca7 Compare November 5, 2023 16:37
The entire container is now cleaned periodically instead of the previous, more complex way.
@clemahieu clemahieu force-pushed the fix_block_uniquer_linear_scan branch from 1bb5ca7 to 0c78b06 Compare November 5, 2023 16:41
@clemahieu clemahieu merged commit 6244918 into nanocurrency:develop Nov 5, 2023
14 of 17 checks passed
clemahieu added a commit to clemahieu/nano-node that referenced this pull request Nov 8, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Merged / V26.0
Development

Successfully merging this pull request may close these issues.

2 participants