Skip to content

x/net/spdy: Framer lacks mechanism to more closely manage memory #6037

@DanielMorsing

Description

@DanielMorsing
Framer allocates a new buffer on every ReadFrame. This is very expensive when reading in
large files. This lack of memory management also makes implementing flow control
difficult. If endpoint A sets the stream window to 1 megabyte and endpoint B writes a
frame with size 2 megabyte, we're forced to read in the 2 megabyte frame, meaning we
can't do either of error handling options presented in the spec.

A possibility is to have a method on framer that lets us set the buffer to be used on
data frames. However, we would have to handle partial frame reads then.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions