hyperium / http-body

Asynchronous HTTP body trait
MIT License
129 stars 50 forks source link

perf(util): optimize `<BufList as Buf>::has_remaining` #94

Closed tesaguri closed 8 months ago

tesaguri commented 1 year ago

This allows short-circuiting when there is a non-empty chunk.

tesaguri commented 1 year ago

The CI failure doesn't seem to be relevant to this patch.

yanns commented 8 months ago

Could we have a release for this?

seanmonstar commented 8 months ago

I checked the benchmarks and didn't see much difference with this. But I've filed #112 which does help a lot.

yanns commented 8 months ago

For me, that change was a big improvement: https://github.com/tokio-rs/axum/discussions/2381#discussioncomment-8567799 I'll try https://github.com/hyperium/http-body/pull/112