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

feat: enable prefetch on the new engine #164

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

keefel
Copy link
Contributor

@keefel keefel commented Oct 17, 2024

Description

Enable trie prefetch on the new engine and implement some optimizations.

Rationale

There are two optimizations:

  1. Previously, the prefetch feature did not affect the old engine using parallel state root computation. We should prefetch the account tree and storage trees concurrently to ensure that the account tree nodes are loaded before computing the state root. This optimization can reduce the state root computation time of the old engine by about 28%.

  2. Enable prefetching on the new engine, this optimization can reduce the state root computation time of the new engine by about 20%.

Example

NA

Changes

Notable changes:

  • NA

Potential Impacts

  • Improve state root computation performance.

@keefel keefel force-pushed the enhance-prefetch2 branch from fe51c20 to 331b982 Compare October 21, 2024 10:28
Copy link
Collaborator

@unclezoro unclezoro left a comment

Choose a reason for hiding this comment

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

LGTM

@keefel keefel force-pushed the enhance-prefetch2 branch from 331b982 to e97fdd0 Compare October 24, 2024 08:41
@keefel keefel force-pushed the enhance-prefetch2 branch from e97fdd0 to 3dfa737 Compare October 24, 2024 09:26
@keefel keefel added this pull request to the merge queue Oct 25, 2024
Merged via the queue into bnb-chain:develop with commit 80317a4 Oct 25, 2024
46 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