Skip to content

Fix performance issue in block_uniquer cleanup.#4326

Merged
clemahieu merged 1 commit intonanocurrency:developfrom
clemahieu:fix_block_uniquer_linear_scan
Nov 5, 2023
Merged

Fix performance issue in block_uniquer cleanup.#4326
clemahieu merged 1 commit intonanocurrency:developfrom
clemahieu:fix_block_uniquer_linear_scan

Conversation

@clemahieu
Copy link
Copy Markdown
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
clemahieu added a commit to clemahieu/nano-node that referenced this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged / V26.0

Development

Successfully merging this pull request may close these issues.

3 participants