Unreasonable CPU usage
Opened this issue · 4 comments
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?
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
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
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.
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)