discord / lilliput

Resize images and animated GIFs in Go
https://discord.com/blog/how-discord-resizes-150-million-images-every-day-with-go-and-c
Other
1.96k stars 123 forks source link

Reuse ICC buffer #163

Closed skidder closed 4 months ago

skidder commented 6 months ago

Since the introduction of ICC profile handling, heap memory usage has grown steadily due to how ICC byte-array buffers are allocated.

This PR introduces a sync.pool to reuse ICC buffers for more stable memory usage.

skidder commented 4 months ago

Closing since this optimization isn't needed at this time.