mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 17:35:50 +03:00
[GH-ISSUE #205] Idle CPU usage #1042
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1042
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Icelk on GitHub (May 28, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/205
Describe the bug
When
spotify_playeris not playing (only tested with the integrated streaming on), it still uses ~7% of 1 CPU core (on a modern Ryzen).To Reproduce
Open the app.
Expected behavior
< 1%
Log and backtrace
I the default config, though suspect this has something to do with
image.Environment
-F notify,image,lyric-finder,pulseaudio-backend,streaming,media-control --no-default-features@aome510 commented on GitHub (May 28, 2023):
FYI, it was ~
0.7%of 1 CPU core for my M1 Macbook Air. It would be helpful if you can provide a video/pictures for a demonstration.Why do you think that
7%is not a good number but<1%? Do you have any baselines for comparison?@Icelk commented on GitHub (May 30, 2023):
I'll try to compile with other feature sets, to see if I can narrow it down.
Compared to spotifyd, which uses 0-1% while idle. Playback should consume more cpu than being idle, but for now playback only uses ~2%, which is great!
@Icelk commented on GitHub (Jun 6, 2023):
Looks to be an issue even with all features disabled. I'll include the flamegraph. How often is the UI updated? IIRC, spotify-tui heavily throttled updates when the window wasn't focused (I don't know how to detect that in terminals).

@aome510 commented on GitHub (Jul 15, 2023):
It's determined by
app_refresh_duration_in_msconfig option (default to be every30ms). You can increase the value if the default one feels consuming too much CPU.@Icelk commented on GitHub (Jul 21, 2023):
Thanks! Would it be possible to make that refresh interval
500mswhen I'm not inputting anything intospotify_player, but32mswhen I interact?@jacksongoode commented on GitHub (Sep 20, 2023):
Also seeing CPU usage around 7% too.
@johnend commented on GitHub (Apr 10, 2024):
I'm seeing high CPU usage on my macbookpro11,3 under EndeavourOS usually in the mid 30% range. This is true while playing and running via
cargo run --no-default-features. Generally a great alternative tosptbut that's not really usable for me 😞@aome510 commented on GitHub (Apr 17, 2024):
I've been neglecting the app's performance for a while as its CPU usage is relatively low for me.
topalso gives me around7%w.r.t one core. The previous tool I used reports CPU usage w.r.t all cores, so the number is 1/8 smaller.Now, as I'm more interested in performance optimization, I'll come back to this issue and try something.
@lbonvarl commented on GitHub (Jun 6, 2024):
@aome510 great app so far, however, I see also a significant CPU usage with defaults settings on macbook M1. ncspot in comparison is neglibible.
@aome510 commented on GitHub (Jun 6, 2024):
@lbonvarl thanks for reporting. Can you share the number on your machines, e.g what are CPU usages of
spotify_playerandncspot? It can provide a good baseline for me to optimize.That said, kinda busy lately, so I didn't have the chance to pick up this yet.
@lbonvarl commented on GitHub (Jun 8, 2024):
Hello @aome510, I am on Macbook Pro 13in, 2020 M1 16GB Sonoma 14.5, using current iterm2 3.5 under zsh.
spotify_player sitting idle not playing is at 35% CPU on task manager with defaults setting. I installed via "cargo install spotify_player --features lyric-finder".
I also did "samply record ./spotify_player" from "spotify-player/target/debug" after a cargo build
@lbonvarl commented on GitHub (Jun 9, 2024):
In comparison, same machine here is the data for ncspot installed via homebrew. CPU usage is when idle at 2-3%



@lbonvarl commented on GitHub (Jul 3, 2024):
Hello @aome510, do you need any extra data for this issue ? Let me know.
@atimofeev commented on GitHub (Sep 23, 2024):
Same here. Around 5-7% on idle. Running on 24.05 nixos, pkg from unstable channel.
@RomanCherkasov commented on GitHub (Jan 8, 2025):
Oh. Same here, but... I have more than 10% of CPU utilization on my M1 Air.

Installed from brew. ncspot on same laptop 2% - 5%
@pstumpf commented on GitHub (Dec 4, 2025):
This is very likely related to https://github.com/ratatui/ratatui/issues/1338 .