Commit Graph

3 Commits (b1e4b96e6c81af5cfba2da84a9e9fc37a99698ec)

Author SHA1 Message Date
Jack Christensen b1e4b96e6c Reduce big read buffer allocations with sync.Pool 2022-02-26 19:57:41 -06:00
Jack Christensen e641d0a5ad Reuse connection read buffer
To avoid extra copies and small allocations previously large
read buffers were allocated and never reused. However, the down side of
this was greater total memory allocation and the possibility that a
reference to a single byte could pin an entire buffer.

Now the buffer is reused.
2022-02-26 09:31:45 -06:00
Jack Christensen 2e0ec225de Make Chunkreader an internal implementation detail 2022-02-26 08:50:46 -06:00