Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tokio's
AsyncWrite
trait once again has support for vectored writes inTokio 0.3.4 (see tokio-rs/tokio#3149.
This branch re-enables vectored writes in
h2
.This change doesn't make all that big of a performance improvement in
Hyper's HTTP/2 benchmarks, but they use a
BytesMut
as the buffer.With a buffer that turns into more IO vectors in
bytes_vectored
, theremight be a more noticeable performance improvement.
I spent a bit trying to refactor the flush logic to coalesce into fewer
writev calls with more buffers, but the current implementation seems
like about the best we're going to get without a bigger refactor. It's
basically the same as what
h2
did previously, so it's probably fine.