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(tracing/builder): optimize the trace builder #191

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Sep 8, 2024

Some small optimizes:

  • early return for StateDiff-only requests
  • early check if with_traces instead of inside the for-loop
  • for trace address use Vec::with_capacity(n+1) instead of clone

Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
src/tracing/builder/parity.rs Outdated Show resolved Hide resolved
src/tracing/types.rs Outdated Show resolved Hide resolved
Signed-off-by: jsvisa <delweng@gmail.com>
Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nits

src/tracing/builder/parity.rs Show resolved Hide resolved
src/tracing/builder/parity.rs Outdated Show resolved Hide resolved
jsvisa and others added 2 commits September 9, 2024 22:00
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Signed-off-by: jsvisa <delweng@gmail.com>
@mattsse
Copy link
Contributor

mattsse commented Sep 9, 2024

CI failing due to some unrelated version issue

@mattsse mattsse merged commit dddcaf9 into paradigmxyz:main Sep 9, 2024
5 of 11 checks passed
@jsvisa jsvisa deleted the optimize-parity-trace-build branch September 10, 2024 04:07
lwedge99 pushed a commit to sentioxyz/revm-inspectors that referenced this pull request Oct 8, 2024
Some small optimizes:

- early return for StateDiff-only requests
- early check `if with_traces` instead of inside the for-loop
- for trace address use `Vec::with_capacity(n+1)` instead of `clone`

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
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