jellycli icon indicating copy to clipboard operation
jellycli copied to clipboard

High CPU usage

Open jose1711 opened this issue 2 years ago • 3 comments

Running jellycli on RPi 3. Even when playback is fully stopped it still consumes approx. 20 % of CPU. For comparison mpv playing a local mp3 files takes around 8-9 % CPU and 0 % cpu when paused.

Is there a way to reduce CPU usage on low-end devices?

jose1711 avatar Nov 04 '22 13:11 jose1711

CPU usage goes even higher when playing the files through headless mode (jellycli --no-gui)

jose1711 avatar Nov 04 '22 22:11 jose1711

Hey, I have no idea what's the underlying problem or where's the CPU time spent. If you're interested to spend some time debugging this, you could try to profile it and create a flame graph so that we can see exactly where's all that time spent. Other than that, there's very little I can do about it, unfortunately.

tryffel avatar May 27 '23 16:05 tryffel

I profiled it on my PC and here's the resulting flame graph: obrázok

Zoomed into oto.NewContext.func1: obrázok

I find it interesting that despite the fact that nothing is being played almost 40 % of CPU time is spent in low level audio library.

jose1711 avatar May 29 '23 09:05 jose1711