-
Notifications
You must be signed in to change notification settings - Fork 151
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
TrieDB: use im::OrdMap to reduce memory consumption #1141
Conversation
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, have you compare saving checkpoint of these data structures?
No, I haven't. There is no significant difference in the early blocks. In order to make a meaningful comparison, I think it needs to sync to recent blocks which make big-size checkpoints. @jasl Could you build a test version and ask @doyleguo to test it? |
No Problem, this is PRuntime V2 right? BTW, does this need to back port to v0 to replace std::Hash one? |
Yep, this is V2. For v0 we already replaced
|
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.
2c0b4b7
to
6409932
Compare
The
im::HashMap
has a really heavy memory overhead. Let's useim::OrdMap
to reduce memory usage.Drawback
im::OrdMap
is a bit slower thanim::HashMap
. It took about57 minutes
to sync from block height 0 to 900000 vs52 minutes
forim::HashMap
.