Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Perf: Massively improved the performance of the replayMilestones method #1197
This PR refactors the replayMilestones method to first accumulate all changes and then apply them in a single call. This allows us to modify the milestone without having to create a copy of the state first. Since the Snapshot and its corresponding SnapshotState are huge datastructures, this change reduces the time required for a rebuild of the ledger state after a IRI restart from a few hours to a few seconds (for a non-snapshotted database).
Type of change