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

perf: pass around a cached block hash during block validation #5613

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

PastaPastaPasta
Copy link
Member

this change saw a ~38% performance improvement in header sync reindex

reproduce via time ./src/qt/dash-qt --nowallet --testnet --reindex --stopatheight=5

On Develop this took average of 1:48 to finish, on this branch it took 1:07

Issue being fixed or feature implemented

Slow header / block validation

What was done?

Pass around cached block hash

How Has This Been Tested?

Reindexed testnet

Breaking Changes

None

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@PastaPastaPasta PastaPastaPasta added this to the 20 milestone Oct 15, 2023
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

118.04s user 10.80s system 113% cpu 1:53.43 total
vs
96.26s user 9.98s system 113% cpu 1:33.74 total
in my case

build is broken btw, c284831 should help

also, I'm getting comparable results
96.47s user 9.34s system 111% cpu 1:35.26 total
with a much simpler diff 40a34f2

@PastaPastaPasta
Copy link
Member Author

I think I like your diff; applied

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

ACK

@UdjinM6 UdjinM6 requested review from ogabrielides and knst October 16, 2023 16:50
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

ACK

@PastaPastaPasta PastaPastaPasta merged commit 7ad7cbf into dashpay:develop Oct 16, 2023
7 checks passed
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