Skip to content

Conversation

@sondreb
Copy link
Member

@sondreb 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
Copy link
Member

@dangershony dangershony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, I will try the rocksdb impl

@dangershony
Copy link
Member

I confirm this works on rocksdb

@MithrilMan
Copy link
Contributor

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

@sondreb
Copy link
Member Author

sondreb commented May 18, 2021

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.

@dangershony
Copy link
Member

the only difference now is that I also put a reference to the whole hierarchy of objects into an array and sort that

I think that's negligible in memory terms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants