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

snapshots: optimize BodyTxsAmountQuery using skip #2045

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

battlmonstr
Copy link
Contributor

In order to reach the last element of the body snapshot, we did it++ N times (and deserialize N times).
Instead, do it.skip() N-1 times and it++ once.

@battlmonstr battlmonstr requested a review from canepat May 28, 2024 10:53
@canepat canepat added the performance Performance issue or improvement label May 28, 2024
@canepat canepat merged commit eba880f into master May 28, 2024
4 checks passed
@canepat canepat deleted the pr/txscntskip branch May 28, 2024 22:18
battlmonstr added a commit that referenced this pull request May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance issue or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants