High CPU usage #325

Open
opened 2022-08-24 10:22:09 -04:00 by LennyLip · 8 comments
LennyLip commented 2022-08-24 10:22:09 -04:00 (Migrated from github.com)

I noticed that the last version is used from 20 to 30% CPU (of M1). And 10-20% CPU when COG is hide.
Other players use 5% CPU in foreground mode.

  1. How can I disable spectrum? (can't do it with d'n'd editor)
  2. How I can reduce CPU usage to 5%?
I noticed that the last version is used from 20 to 30% CPU (of M1). And 10-20% CPU when COG is hide. Other players use 5% CPU in foreground mode. 1) How can I disable spectrum? (can't do it with d'n'd editor) 2) How I can reduce CPU usage to 5%?
nevack commented 2022-08-24 12:19:05 -04:00 (Migrated from github.com)

Oops, it's true, you can't remove any Toolbar items in latest build :(

Oops, it's true, you can't remove any Toolbar items in latest build :(
LennyLip commented 2022-08-26 07:56:57 -04:00 (Migrated from github.com)
Screenshot 2022-08-26 at 14 53 58 :) result of reading incorrect CUE.
<img width="341" alt="Screenshot 2022-08-26 at 14 53 58" src="https://user-images.githubusercontent.com/955994/186898191-122084ca-d0cc-4165-9f51-3a20a955fa9d.png"> :) result of reading incorrect CUE.
kode54 commented 2022-10-16 03:23:17 -03:00 (Migrated from github.com)

Sorry about the CUE thing, it shouldn't be locking up when reading invalid files. As for the visualizations processing in the background, ee5231f567 / 066ee806dc should alleviate that.

Sorry about the CUE thing, it shouldn't be locking up when reading invalid files. As for the visualizations processing in the background, ee5231f567a354e9320ae1432695a30cea9de9c7 / 066ee806dca273a1bfe371ad86a58b13c27ab4f2 should alleviate that.
kode54 commented 2023-10-08 21:57:52 -03:00 (Migrated from github.com)

It should process CUEs faster, but I don't know what to do about that, since embedded formats need to read full tags every track.

As for spectrum, remove it from the toolbar with the customize toolbar mode, or hide the window somehow (obscure it, or minimize it, or close it and summon it again later) and the visualization will stop processing most of its work. Apparently most of the processing power comes from the inflexible forced 60fps updating SceneKit display. I should add a configurable frame rate, and maybe separate frame rate for the larger window mode, and default them to like 15fps like most other players do.

It should process CUEs faster, but I don't know what to do about that, since embedded formats need to read full tags every track. As for spectrum, remove it from the toolbar with the customize toolbar mode, or hide the window somehow (obscure it, or minimize it, or close it and summon it again later) and the visualization will stop processing most of its work. Apparently most of the processing power comes from the inflexible forced 60fps updating SceneKit display. I should add a configurable frame rate, and maybe separate frame rate for the larger window mode, and default them to like 15fps like most other players do.
LennyLip commented 2023-10-12 12:24:15 -03:00 (Migrated from github.com)

Ok, looks it works ok now - 4-5% CPU without spectrum, and 12-14% CPU with spectrum. Customizing toolbar works ok now too. Thanks.

Ok, looks it works ok now - 4-5% CPU without spectrum, and 12-14% CPU with spectrum. Customizing toolbar works ok now too. Thanks.
jjolmo commented 2025-01-31 09:46:58 -03:00 (Migrated from github.com)

I'm getting around 31% CPU usage in M2 MAX

Image

I'm listening to a .ogg file

With mp3 it seems to be 25% initially, then goes to around 30%

Tested with the last nightly. Are there some options that could reduce this high CPU usage issue?

It is not something temporal. It seems to consume 30% of CPU. I have a big list of music. I'm unsure if that would use CPU or just memory.

Edit: oh wow, I just removed the spectum. Now it uses around 9%

I'm getting around 31% CPU usage in M2 MAX <img width="429" alt="Image" src="https://github.com/user-attachments/assets/75924763-801e-4ca7-9a2a-1694a0db94c2" /> I'm listening to a .ogg file With mp3 it seems to be 25% initially, then goes to around 30% Tested with the last nightly. Are there some options that could reduce this high CPU usage issue? It is not something temporal. It seems to consume 30% of CPU. I have a big list of music. I'm unsure if that would use CPU or just memory. Edit: oh wow, I just removed the spectum. Now it uses around 9%
kode54 commented 2025-02-01 01:43:00 -03:00 (Migrated from github.com)

Yes, sorry. It comes from the Spectrum. I need to add a frame rate option, because it currently processes at 60 frames per second. I should probably default to like 15 frames per second and make anything other than that configurable.

Also, using the non-3D spectrum won't hit your GPU like the 3D one does. (It hits for about 5-15% for the 60fps, while it's visible)

The CPU usage is entirely from doing the FFT for every frame. I could probably do with calculating FFT less often and using linear interpolation.

I'll try both options, tonight.

Yes, sorry. It comes from the Spectrum. I need to add a frame rate option, because it currently processes at 60 frames per second. I should probably default to like 15 frames per second and make anything other than that configurable. Also, using the non-3D spectrum won't hit your GPU like the 3D one does. (It hits for about 5-15% for the 60fps, while it's visible) The CPU usage is entirely from doing the FFT for every frame. I could probably do with calculating FFT less often and using linear interpolation. I'll try both options, tonight.
kode54 commented 2025-02-01 07:48:46 -03:00 (Migrated from github.com)

Try using the non-3D visualization as well for now. It uses way less CPU. I need to figure out why SceneKit uses so much CPU.

Try using the non-3D visualization as well for now. It uses way less CPU. I need to figure out why SceneKit uses so much CPU.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: chris/Cog#325
No description provided.