Conversation
sondreb
commented
May 18, 2021
- This is a small improvement on the performance, there are alternative ways to do this than using Dictionary, which is a little bit faster still. This is the cleanest example, please suggest and try out improvements.
- Only the LevelDB implementation has been verified.
- Node startup performance #337
- This is a small improvement on the performance, there are alternative ways to do this than using Dictionary, which is a little bit faster still. This is the cleanest example, please suggest and try out improvements. - Only the LevelDB implementation has been verified. - #337
dangershony
left a comment
There was a problem hiding this comment.
looks good, I will try the rocksdb impl
|
I confirm this works on rocksdb |
|
at a first glance, the problem with that approach is that you load whole set in memory so if the blockchain is big you'll waste a lot of RAM at startup |
It is already read into memory, the only difference now is that I also put a reference to the whole hierarchy of objects into an array and sort that, as oppose to having just a "parent" reference on each object. It shouldn't duplicate the objects, but I need to verify that. |
I think that's negligible in memory terms |