tryffel / jellycli

Jellyfin terminal client
GNU General Public License v3.0
206 stars 8 forks source link

High CPU usage #40

Open jose1711 opened 1 year ago

jose1711 commented 1 year ago

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 commented 1 year ago

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

tryffel commented 1 year ago

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.

jose1711 commented 1 year ago

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.