clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.78k stars 682 forks source link

Clementine uses an extremely high amount of CPU to play long songs #6030

Open tronster opened 6 years ago

tronster commented 6 years ago

Before posting

Please follow the steps below and check the boxes with [x] once you did the step.

System information

Please provide information about your system and the version of Clementine used.

Expected behaviour / actual behaviour

Expected: 10% CPU usage or less when playing a song. Expectation determine by watching the macOS "Activity Monitor" and comparing to other popular MP3 players on the same system/OS: iTunes (12.7.3.46): 2% - 7% (with 20% first minute) VLC (2.2.8): 5.0%-5.6% Actual behavior: 25% - 35%, with 125% for the first minute or so)

Steps to reproduce the problem (only for bugs)

Turn off any visualizations. Load a 1 hour MP3 at 320 kbps (around 166.9 MB) Play the song.

mspacek commented 6 years ago

Keep in mind that the first time you play a song, the mood bar has to be calculated, which requires analyzing the entire track, which clem tries to do ASAP, therebey using lots of CPU. If it's a long track, it'll take a long time. Does this happen every time you play the track? It should only happen the first time. Check the settings under Appearances->Moodbars. Try disabling moodbar generation there, see if that helps.

tronster commented 6 years ago

Thank you for the response. The mood bar (and visualizer) are disabled; I did this after the CPU spiked 125% (dual core Mac, guess you can go over 100% if more than one CPU?)

Seems to happen every time I play a track whether its the first or a subsequent play"

On Mar 21, 2018, at 10:57 AM, Martin Spacek notifications@github.com wrote:

Keep in mind that the first time you play a song, the mood bar has to be calculated, which requires analyzing the entire track, which clem tries to do ASAP, therebey using lots of CPU. If it's a long track, it'll take a long time. Does this happen every time you play the track? It should only happen the first time. Check the settings under Appearances->Moodbars. Try disabling moodbar generation there, see if that helps.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clementine-player/Clementine/issues/6030#issuecomment-374967253, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3aOSDMoA6iCAT3Lf7cYEFH4Wk9PvVjks5tgmpwgaJpZM4SvZJj.

othalan commented 6 years ago

I agree that Clementine uses far too much CPU (I am on a MacBook Pro) compared to every other music player I have tried. Typical CPU usage 30% - 35%. compared to less than 10% for every other music player I have used.

jonaski commented 6 years ago

Maybe this has something to do with the way Clementine was compiled. Someone with a Mac should try to compile using the current git. I believe there are some package managers for Mac now that could add most of the dependencies. I'd investigate it, but I don't have a Mac.

othalan commented 6 years ago

I supect the CPU usage is mostly from the gstreamer backend. I discovered the music player Quod Libet has the same problem (though not quite as severe as Clementine) and ended up experimenting with using VLC as backend replacement to gstreamer. The result was CPU usage dropped form about 25% to about 5%. As Clementine also uses gstreamer, I am suspect the same problem.

fordp2002 commented 3 years ago

I get this on Windows 10.