-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Adaptive Read Buffer #1708
Copy link
Copy link
Closed
Labels
A-http1Area: HTTP/1 specific.Area: HTTP/1 specific.C-performanceCategory: performance. This is making existing behavior go faster.Category: performance. This is making existing behavior go faster.E-mediumEffort: medium. Some knowledge of how hyper internal works would be useful.Effort: medium. Some knowledge of how hyper internal works would be useful.
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
readon 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-http1Area: HTTP/1 specific.Area: HTTP/1 specific.C-performanceCategory: performance. This is making existing behavior go faster.Category: performance. This is making existing behavior go faster.E-mediumEffort: medium. Some knowledge of how hyper internal works would be useful.Effort: medium. Some knowledge of how hyper internal works would be useful.