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.94k stars 124 forks source link

Reuse ICC buffer #163

Closed skidder closed 4 hours ago

skidder commented 1 month 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 hours ago

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