Skip to content

perf: avoid heap allocation when parsing incoming eth messages - #117

Merged
rllola merged 1 commit into
mainfrom
fix/dont-copy-when-parsing
Apr 26, 2026
Merged

perf: avoid heap allocation when parsing incoming eth messages#117
rllola merged 1 commit into
mainfrom
fix/dont-copy-when-parsing

Conversation

@rllola

@rllola rllola commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

parse_block_headers, parse_block_bodies, and parse_receipts now accept &[u8] instead of Vec, eliminating a full copy of each received message (potentially several MB per batch) before the snap decompression step. Call sites updated to pass slices directly.

parse_block_headers, parse_block_bodies, and parse_receipts now accept
&[u8] instead of Vec<u8>, eliminating a full copy of each received
message (potentially several MB per batch) before the snap decompression
step. Call sites updated to pass slices directly.
@rllola
rllola merged commit 07e1482 into main Apr 26, 2026
2 checks passed
@rllola
rllola deleted the fix/dont-copy-when-parsing branch April 26, 2026 14:56
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.

1 participant