Skip to content

Adaptive Read Buffer #1708

Closed
Closed
@seanmonstar

Description

@seanmonstar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-http1Area: HTTP/1 specific.C-performanceCategory: performance. This is making existing behavior go faster.E-mediumEffort: medium. Some knowledge of how hyper internal works would be useful.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions