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

Improve pipelining for validated sending in provider #941

Open
rklaehn opened this issue Apr 6, 2023 · 1 comment
Open

Improve pipelining for validated sending in provider #941

rklaehn opened this issue Apr 6, 2023 · 1 comment
Labels
perf performance related issues

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Apr 6, 2023

Currently, we use bao_tree::tokio::encode_ranges_validated to encode a blob. This leads to a small but detectable performance decrease, since the operation is not pipelined at all.

It is basically:

  • read chunk
  • validate chunk
  • write chunk

in a loop.

We could pipeline things so that reading happens in a stream, validation is an intermediate stage, and writing is the last stage. Then you can tweak both read parallelism and validate parallelism by just using https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html#method.buffered in the right places.

@rklaehn
Copy link
Contributor Author

rklaehn commented Aug 3, 2023

This would still give a small benefit, but once BLAKE3-team/BLAKE3#329 is merged all bao-tree blake3 functions will be even faster, on all architectures that support any kind of SIMD.

So the pressure to do this is quite a bit less...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf performance related issues
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant