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

avoid buffer copy in generate_coding_shreds #27494

Closed

Conversation

jbiseda
Copy link
Contributor

@jbiseda jbiseda commented Aug 31, 2022

Problem

Shredder::generate_coding_shreds allocates and zeros buffers for parity shreds, then copies parity data into shred buffers.

Summary of Changes

Use shred buffers directly.

Fixes #

@jbiseda jbiseda marked this pull request as ready for review August 31, 2022 04:08
@behzadnouri
Copy link
Contributor

The tradeoff here is code simplicity and smaller api surface.
So I think it would be worth to see if these buffer copies do actually have a significant impact on validator runtimes.
Benchmarks rarely capture validator runtime and actual bottlenecks, so might be good to instead run a test gce cluster with and without this code and see if there is a significant gain; something like: #27510 (comment)

If there is no significant gain, I personally lean to have smaller api surface and keep the code simpler and more expressive to avoid introducing bugs.

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 29, 2022
@github-actions github-actions bot closed this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants