How to limit ram usage for swww?
I often encounter memory leak problems with swww, every time I change the .gif desktop, swww uses an additional 100MB to 1.5GB of RAM and then slowly reduces RAM usage over time. I'm currently using fedora 40 with hyprland, I tried swww with arch, debian and this error also appears with both other distros.
Does this happen if you use swww img --transition none?
Does this happen if you use
swww img --transition none?
No
Alright. Well, in that case, this is not a memory leak. Specially since memory usage goes down later. This is expected behavior: we allocate some memory to do the transition, while the animations are waiting for the transitions to finish. Once the transitions are done, they deallocate their internal structures and the animation starts.
There is not any way of making this smaller, other than skipping transitions altogether with --transition none. The only alternative would be using a different gif with fewer frames in it, or with frames that change less.