digimezzo / dopamine-windows

Audio player which tries to make organizing and listening to music as simple and pretty as possible.
https://digimezzo.github.io/site/
GNU General Public License v3.0
1.88k stars 264 forks source link

Massive CPU Usage #672

Open scrungus opened 6 years ago

scrungus commented 6 years ago

I'm submitting a...


[ ] Regression 
[ x] Bug report  
[ ] Feature request

I'm using these versions

Reproduction steps

Observed behavior

Using around 50% of CPU constantly. I have an i5 6600k. Will stutter if any other program uses a lot of CPU time

Desired behavior

Use much less

Log file

image

Magentaize commented 6 years ago

Some users also report this issue, but I have no idea and cannot repro.

AbdelrahmanHafez commented 6 years ago

+1 playlist with 1000 soundtracks on shuffle

fhmr commented 6 years ago

Yep I'm also getting this when playing a large playlist.

digimezzo commented 6 years ago

To @scrunguss, @AbdelrahmanHafez, @fhmr and anyone else experiencing this issue. We're having a hard time reproducing this issue. So, if you don't mind, we'd like you to do some investigation on your computer. Here is how you can help:

1. Download Process Explorer It is a stand-alone tool from Microsoft, which doesn't require to be installed on your computer. This is the download link: https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer You will get a zip file, that you'll have to extract. The file that interests us in the zip is "procexp.exe".

2. Find treads which use a lot of CPU by using Process Explorer Perform this step when Dopamine is started, and when it is consuming a lot of CPU. Right-click procexp.exe and select "Run as administrator". You'll get a window which looks like this:

image

In that Window, find Dopamine.exe and double click it. You'll get a window like this:

image

Make sure you select the "Threads" tab. Then, take a screenshot of that screen When the screenshot is taken, find the thread which uses the most CPU and double click it. That will show you a stack trace for that thread, which looks like this:

image

Take a screenshot of the stack trace

Add both screenshots to this bug report.

To summarize, we need 2 screenshots:

Screenshot 1: the threads window of Process Explorer Screenshot 2: the stack trace window of Process Explorer, for the thread which uses the most CPU.

Thanks!

AbdelrahmanHafez commented 6 years ago

I would love to help on this one, but I have switched media players some time ago, commenting this in hope that @scrunguss @fhmr would help. Best of luck!

digimezzo commented 6 years ago

@AbdelrahmanHafez no problem. Just out of curiousity. Which media player are you now using, and which feature has won you over? :) (I'm just trying to find out where I can improve). Thanks!

scrungus commented 6 years ago

Just to let you know, I am currently running 2.0 and no longer seem to be experiencing the issue. Something in the update must've resolved it.

On Mon, 8 Oct 2018, 10:47 Digimezzo, notifications@github.com wrote:

@AbdelrahmanHafez https://github.com/AbdelrahmanHafez no problem. Just out of curiousity. Which media player are you now using, and which feature has won you over? :) (I'm just trying to find out where I can improve).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/digimezzo/Dopamine/issues/672#issuecomment-427776258, or mute the thread https://github.com/notifications/unsubscribe-auth/AgIgKqTPZNpnirbH79_I-xba3ojdysyZks5uix8jgaJpZM4SJ3bO .

AbdelrahmanHafez commented 6 years ago

@digimezzo I started using foobar2000, I posted a reddit topic asking for people's opinions, and what my required features are.

I am in it mainly for the UX, the fact that I can navigate the app with my keyboard only, and minimize to tray without having to touch my mouse. Other perks are the simple, customizable UI. I started switching the UI in everything that I can to match Atom Dark One theme, and how light it is.

SCLeoX commented 6 years ago

@digimezzo dopamine_2018-10-08_16-24-19 taskmgr_2018-10-08_16-23-54 procexp64_2018-10-08_16-23-30 procexp64_2018-10-08_16-23-40

My processor is i5-6200U My playlist contains 5302 songs

SCLeoX commented 6 years ago

Dopamine will usually use a bunch of CPU when started. Then, the CPU usage will drop to about 5%-20% which is tolerable. After a couple hours, CPU usage will rise again to above 50%. This time, it will not decrease and the music will have a hard time playing. However, restart Dopamine does solve the problem.

rikonaka commented 5 years ago

I found that the default Spectrum style configuration may be the cause of excessive CPU and GPU usage, which in the Setting->Playback.

rikonaka commented 5 years ago

The default setting of the program is Flames. After I change to Stripes, the high CPU and GPU occupancy rate drops below 10%. image Task Manager image When I use the Flames setting, the CPU and GPU usage is as high as 30%. After changing to Stripes, it is much better now. I hope this feedback can help you.

SCLeoX commented 5 years ago

@rikonaka Thanks for sharing. It is a little bit better. But my usage is still as high as 30% (was about 35%)

edit: nope it is back to 60% after about 2 minutes

digimezzo commented 5 years ago

@SCLeoX As your system seems to be affected a lot, could you have a look at my post a bit higher, concerning Process Explorer? Could you follow that procedure and post some screenshots about what you see in process explorer. That would be really helpful to troubleshoot this issue. Thanks.

SCLeoX commented 5 years ago

@digimezzo If you scroll up a little bit, you can see I already did that about 8 month ago.

digimezzo commented 5 years ago

Sorry, I didn't realize it was you. Those screenshots didn't help unfortunately. Is was hoping to get insight on other people's processes to try to understand what is happening.

digimezzo commented 5 years ago

@SCLeoX Do you also have massive cpu usage when the spectrum analyzer is disabled completely? (When you toggle it off in the settings).

SCLeoX commented 5 years ago

@digimezzo Yes, I distinctively remember I tried that too and it did not solve the issue.

Now I am using a new laptop (with much higher specs), the cpu usage issue is gone completely. (I am using the exact same music library and Dopamine binary as I simply copy-paste the entire folder to my new laptop.)

Magentaize commented 5 years ago

@SCLeoX Yep, so the problem has gone away by replacing your old laptop now. As I've said a few month ago, i5-6200U is too weak to run a huge music library and buying a new laptop with cpu model which end of H may be a better choice.