Skip to content
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

Improve loading time with many blocks #127

Open
Tracked by #125
ineiti opened this issue Feb 28, 2024 · 0 comments
Open
Tracked by #125

Improve loading time with many blocks #127

ineiti opened this issue Feb 28, 2024 · 0 comments

Comments

@ineiti
Copy link
Member

ineiti commented Feb 28, 2024

If there are many blocks (3000 for 10k votes), startup of a node takes about 1 minute. This is due to the method here:

https://github.com/c4dt/dela/blob/main/core/ordering/cosipbft/blockstore/disk.go#L70

It crawls through all blocks, deserializes them, and creates a map of block-hashes to block-indexes. Some comments:

  • this index seems to be never used...
  • one could store this map in another part of the db, so startup would be much faster
  • what is used is the cachedData.last and cachedData.length, so only store those in the db
@ineiti ineiti added this to D-Voting Feb 28, 2024
@ineiti ineiti moved this to Todo in D-Voting Feb 28, 2024
@ineiti ineiti mentioned this issue Feb 28, 2024
19 tasks
@PascalinDe PascalinDe moved this from Todo to Backlog in D-Voting Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant