Skip to content

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Dec 15, 2021

When doing some syncs, I noticed that in the heal phase, the db reads is going through the roof. This PR aims to bring that down a little bit, or at least reduce some allocation when that happens, by using db.Has wherever possible.

I'll do a benchmark later, also to verify that it doesn't break anything.

@holiman
Copy link
Contributor Author

holiman commented Dec 16, 2021

Finished a snap-sync (with blocks already present): https://geth-bench.ethdevops.io/d/Jpk-Be5Wk/dual-geth?orgId=1&from=1639661782210&to=1639685566480 . No obvious difference in charts, but it seems at least that it doesn't break anything.

@holiman holiman marked this pull request as ready for review December 16, 2021 20:16
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

SGTM

@karalabe karalabe added this to the 1.10.16 milestone Jan 6, 2022
@karalabe karalabe merged commit af2ca5a into ethereum:master Jan 6, 2022
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Jan 11, 2022
trie, core, eth: use db.has over db.get where possible
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jun 9, 2025
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jul 10, 2025
gzliudan added a commit to XinFinOrg/XDPoSChain that referenced this pull request Jul 11, 2025
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 8, 2025
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 8, 2025
gzliudan added a commit to XinFinOrg/XDPoSChain that referenced this pull request Aug 20, 2025
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.

2 participants