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

Higher CPU Usage than spotify's client #131

Closed
nloyola opened this issue Mar 6, 2021 · 4 comments
Closed

Higher CPU Usage than spotify's client #131

nloyola opened this issue Mar 6, 2021 · 4 comments

Comments

@nloyola
Copy link

nloyola commented Mar 6, 2021

I'm running Ubuntu 20.10 and I built / installed Spot from the GitHub repository. I built with commit b891440.

Using htop, I've noticed that Spot uses around 30% - 40% CPU on two different processes when playing a playlist . Even after running it for more than 5 minutes.

If I do the same thing with the Spotify client, I only see about 5% to 10% CPU usage.

Is there anything I can do to lower CPU usage?

Here are my CPU specs:

processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 158
model name	: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
stepping	: 9
microcode	: 0xde
cpu MHz		: 801.045
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes

Thanks

@xou816
Copy link
Owner

xou816 commented Mar 6, 2021

Hi! Might be worth compiling in release mode (meson: -Dbuildtype=release), I'm not noticing excessive CPU usage on my end (with a somewhat worse CPU). Is it only during playback, for large playlists, etc?

@nloyola
Copy link
Author

nloyola commented Mar 7, 2021

Thanks @xou816! Building with release buildtype works much better. Now uses less than 5% CPU.

Yes, this only happens during playlist playback.

Maybe the README file should say -Dbuildtype=release?

Spot is awesome! I'm definitely switching!

@xou816
Copy link
Owner

xou816 commented Mar 8, 2021

Glad it helped! Right, I should mention this probably :)

@xou816
Copy link
Owner

xou816 commented Mar 11, 2021

Updated README, closing this :)

@xou816 xou816 closed this as completed Mar 11, 2021
tomfitzhenry added a commit to tomfitzhenry/nixpkgs that referenced this issue Sep 18, 2021
xou816/spot#131 reports that this dropped
~30-40% to 5-10% on an i7-7700.

On my Pinephone, it dropped 70% to 10%.
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

2 participants