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

Unreasonable CPU usage #314

Open
ttoommxx opened this issue Sep 21, 2023 · 4 comments
Open

Unreasonable CPU usage #314

ttoommxx opened this issue Sep 21, 2023 · 4 comments

Comments

@ttoommxx
Copy link

I am using the flatpak version of blanket and I noticed that the app uses 4 times more CPU than when I am playing sound from, say chrome. Any explanation for this? Is it not hardware accelerated?

@b1ek
Copy link

b1ek commented Oct 1, 2023

My guess is that its just Python being Python. I briefly read through the code, and didnt find any ridiculous while loops that might be the cause. Although the maintainers would know it better

@ttoommxx
Copy link
Author

ttoommxx commented Oct 1, 2023

That's what I thought too, though even for python that usage looks not too reasonable. Well the app is really nice though, so don't really mean to escalate the problem

@rafaelmardojai
Copy link
Owner

The CPU usage only goes up when the app is playing, and it goes higher or lower depending on how much sounds you're playing at once.

So I would assume that the cause is GStreamer. If you play individual sounds on Totem or Clapper, you will see a CPU usage that is equal to or higher than Blanket when multiplied by the number of sounds playing at once.

@lukas-kasticky
Copy link

'Volume levels' setting page showing multiple volume sliders for Blanket

In a related note, Blanket is using one channel per sound instead of combining them. Maybe that makes a difference performance-wise. Then the multi-channel output could be made optional. (It still has its uses, i.e. playing Rain on the stereo and Summer Night through a different speaker closer to the window)

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

4 participants