Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to limit ram usage for swww? #294

Open
orcbolg3612 opened this issue Apr 25, 2024 · 3 comments
Open

How to limit ram usage for swww? #294

orcbolg3612 opened this issue Apr 25, 2024 · 3 comments

Comments

@orcbolg3612
Copy link

image
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.

@LGFae
Copy link
Owner

LGFae commented Apr 25, 2024

Does this happen if you use swww img --transition none?

@orcbolg3612
Copy link
Author

Does this happen if you use swww img --transition none?

No

@LGFae
Copy link
Owner

LGFae commented Apr 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants