zetcd icon indicating copy to clipboard operation
zetcd copied to clipboard

efficient send message buffering

Open heyitsanthony opened this issue 8 years ago • 0 comments

The encoder expects a full-sized buffer, but the size of the message isn't known until encode time. Currently zetcd allocates a pool of maximum sized buffers and writes to those, somewhat mitigating the problem of repeatedly allocating huge buffers. However, there's still a sizeable memory cost.

Ideally the encoder will either allocate data as it needs it or copy into a larger, pooled buffer if the current buffer winds up being too small.

heyitsanthony avatar Apr 10 '17 06:04 heyitsanthony