PrayagS / polybar-spotify

:musical_note: Spotify status and controls module for Polybar with text scrolling
MIT License
581 stars 38 forks source link

Added interval to reduce cpu/ram usage #23

Closed p0ryae closed 2 years ago

p0ryae commented 2 years ago

I had a spike in my CPU by using this. This action is very unhealthy for long-term use and affects gaming performance.

I solved it by simply adding a 1s interval so it avoids checking on it every millisecond and there is a massive reduction in CPU usage.

PrayagS commented 2 years ago

Thanks for the contribution.

CPU usage has been an issue for a long time. The best solution is to ditch the constant DBus polling but that's how playerctl does it.

Thanks for adding this temporary fix.

p0ryae commented 2 years ago

Thanks for the contribution.

CPU usage has been an issue for a long time. The best solution is to ditch the constant DBus polling but that's how playerctl does it.

Thanks for adding this temporary fix.

Honestly think this should be a very great fix for most people out there - it reduced 10% cpu usage to 1% for me. Deal breaker for sure

PrayagS commented 2 years ago

it reduced 10% cpu usage to 1% for me.

Ah, that's impressive. Seems like we got the easy way out. Thanks again for spotting this!