http-body icon indicating copy to clipboard operation
http-body copied to clipboard

Backport to_bytes performance optimizations

Open rtimush opened this issue 1 year ago • 0 comments

Backports https://github.com/hyperium/http-body/pull/94 and https://github.com/hyperium/http-body/pull/112.

We had some performance issues and found out that to_bytes() has a quadratic complexity with respect to the number of chunks in the BufList (in our case it was taking 10 minutes to run to_bytes on a ~65MB body). This has been already fixed in 1.x, but 0.4.x seems to be still widely used, so it would be nice to have this fix there as well.

rtimush avatar May 14 '24 13:05 rtimush