http-body
http-body copied to clipboard
Backport to_bytes performance optimizations
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.