Skip to content

Animated backgrounds causes sway to use nontrivial CPU #365

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

Closed
deifactor opened this issue Sep 26, 2024 · 2 comments
Closed

Animated backgrounds causes sway to use nontrivial CPU #365

deifactor opened this issue Sep 26, 2024 · 2 comments

Comments

@deifactor
Copy link

Displaying a 4K webp using swww causes the sway process itself to use about 10 times as much load as it does when displaying the original mp4 using mpv (or mpvpaper). I'm guessing that it has to do with the way swww uses wl_shm.

(It also might be just inherent to using shm for animations instead of directly using a GPU buffer; I have vague memories where even continually reusing the same wl_shm buffer would result in large animations using a lot of CPU.)

@LGFae
Copy link
Owner

LGFae commented Sep 26, 2024

If you are playing a "normal" video, then this is expected. swww was specifically optimized to deal with animations that do not change a lot frame to frame. If you want to play something more complex, then I would recommend going for mpvpaper.

@LGFae
Copy link
Owner

LGFae commented May 25, 2025

This should have improved significantly in the latest released version, since we no longer use any multi-threading. At most, it will saturate one CPU thread. So I will closing this. Note that the fact that swww is not designed to work with standard mp4 files remains true.

@LGFae LGFae closed this as completed May 25, 2025
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