-
Notifications
You must be signed in to change notification settings - Fork 337
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
hash-cache-tool: Scan files with mmap and bins #2504
hash-cache-tool: Scan files with mmap and bins #2504
Conversation
accounts-db/src/pubkey_bins.rs
Outdated
@@ -11,12 +11,12 @@ impl PubkeyBinCalculator24 { | |||
std::mem::size_of::<T>() * 8 | |||
} | |||
|
|||
pub(crate) fn log_2(x: u32) -> u32 { | |||
pub fn log_2(x: u32) -> u32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't probably matter, but is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not necessary. Let me revert that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f0a2790.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
Problem
The accounts hash cache tool can be faster by scanning mmap'd files, and then optionally binning the results by pubkey. These binned results will be used when constructing the full state to diff in the next PR.
Summary of Changes
Scanning entries uses mmap'd files into bins.