Closed
Description
Add an adaptive read buffer strategy for proto::h1::io::Buffered
, such that the size of the read buffer changes depending on the amount of bytes that are found on the transport for each read
operation. This concept is similar to Netty's AdaptiveRecvByteBufAllocator.
- After a
read
on the transport, the number of bytes read should be compared with the current guess size.- If the number of bytes is significantly less, the guess should be lowered.
- If the number of bytes is significantly more, the guess should raised.
- It should likely make use of "steps". Something like starting at 1024 and doubling each step is probably a good start.
- If the bytes read stays within the current step, no adjustment is needed.