go-revolver icon indicating copy to clipboard operation
go-revolver copied to clipboard

Reuse artifact buffers

Open derekchiang opened this issue 7 years ago • 1 comments

In networked systems that need access to fixed-size buffers, it's common to use a buffer pool to minimize allocation and relieve GC pressure. Go has sync.Pool that's good for this purpose. It could be an over-optimization though since it's unclear if any peer would ever allocate buffers fast enough that memory actually becomes an issue.

derekchiang avatar Aug 12 '17 00:08 derekchiang

I was looking at this code for instance.

derekchiang avatar Aug 12 '17 00:08 derekchiang