9 Commits

Author SHA1 Message Date
Jack Christensen
eee854fb06 iobufpool uses *[]byte instead of []byte to reduce allocations 2023-01-28 08:02:49 -06:00
Jack Christensen
e12ba1b6b9 Extract iobufpool 2022-05-28 10:59:54 -05:00
Jack Christensen
f14fb3d692 Replace interface{} with any 2022-04-09 09:12:55 -05:00
Jack Christensen
b1e4b96e6c Reduce big read buffer allocations with sync.Pool 2022-02-26 19:57:41 -06:00
Jack Christensen
2fad63c189 Set cap when returning slice from chunkReader 2022-02-26 09:37:14 -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
Jack Christensen
032ea5f5c0 Finish import of chunkreader 2022-02-21 14:29:39 -06:00
Jack Christensen
04476c4a13 Move pgproto3 to subdirectory 2022-02-21 11:57:34 -06:00