re-enable vectored writes (#500)
Tokio's AsyncWrite trait once again has support for vectored writes in Tokio 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, there might 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.
This commit is contained in:
		| @@ -46,7 +46,7 @@ futures-core = { version = "0.3", default-features = false } | ||||
| futures-sink = { version = "0.3", default-features = false } | ||||
| futures-util = { version = "0.3", default-features = false } | ||||
| tokio-util = { version = "0.5", features = ["codec"] } | ||||
| tokio = { version = "0.3.2", features = ["io-util"] } | ||||
| tokio = { version = "0.3.4", features = ["io-util"] } | ||||
| bytes = "0.6" | ||||
| http = "0.2" | ||||
| tracing = { version = "0.1.13", default-features = false, features = ["std", "log"] } | ||||
| @@ -68,7 +68,7 @@ serde = "1.0.0" | ||||
| serde_json = "1.0.0" | ||||
|  | ||||
| # Examples | ||||
| tokio = { version = "0.3.2", features = ["rt-multi-thread", "macros", "sync", "net"] } | ||||
| tokio = { version = "0.3.4", features = ["rt-multi-thread", "macros", "sync", "net"] } | ||||
| env_logger = { version = "0.5.3", default-features = false } | ||||
| rustls = "0.18" | ||||
| tokio-rustls = "0.20.0" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user