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

High CPU usage on some machines #7181

Closed
drFabio opened this issue Sep 12, 2016 · 9 comments
Closed

High CPU usage on some machines #7181

drFabio opened this issue Sep 12, 2016 · 9 comments
Labels
blocked/need-info ❌ Cannot proceed without more information

Comments

@drFabio
Copy link

drFabio commented Sep 12, 2016

  • Electron version: 1.3.4
  • Operating system: Win 7 Ultimate on a Pentium p6100 2.0ghz

I have a application that is pretty much just a webSite saved, with very little front end js code.
On this specific machine (and a few others) the app consumes almost 100% of the cpu when maximized, and as little as 10% when minimized. At first I thought it would be the fact that I am playing audio but if that was the case the minimized app would consume an equivalent amount of CPU.

On my machine a Windows 10 with a Intel Core i7-4510U 2 GHZ 2,6 GHZ it goes to 3% tops. Can this be something electron chromium or something else?

Thanks in advance

PS: I tested some of the buggy machines and on the same site it runs on about 5~20% on a chrome

@zcbenz zcbenz added the blocked/need-info ❌ Cannot proceed without more information label Sep 14, 2016
@zcbenz
Copy link
Member

zcbenz commented Sep 14, 2016

Can you take a CPU profile with Chrome devtools?

@drFabio
Copy link
Author

drFabio commented Sep 14, 2016

Here it is the high usage cpu profile and here the same machine minimized.

Thanks

@zcbenz
Copy link
Member

zcbenz commented Sep 19, 2016

Can you try whether the problem is still there in Electron 1.4.0?

@drFabio
Copy link
Author

drFabio commented Sep 20, 2016

So I tried with 1.4.0 And the problem doesn't seem to be solved , funny thing is I can't save cpuprofiles anymore from devTools they all end up with 0 bytes.

I have some print screens of the cpu profiles though: Maximized and minimized respectively
max
min

@drFabio
Copy link
Author

drFabio commented Sep 20, 2016

It seems that is more a DOM/front end issue and how it deals with animation (there was an animation that was changing a Dom Element width causing the dom to be recalculated) and a hardware issue than anything related with electron or chromium. Don't know why the difference of performance on chrome and chromium though but is not a big issue.

Thanks for the help. The only thing I think maybe is worth a check is to see why cpuprofiles are not being saved on 1.4.

@s-a
Copy link

s-a commented Sep 28, 2016

A user reported the same issue . Application takes 100% CPU and is unresponsive

@drFabio
Copy link
Author

drFabio commented Sep 29, 2016

I Found out that on the page there was a playback bar that changed the width thus causing dom re rendenring and that had a impact of performance on the "crappy" machine of 30% , changing this to a css transform approach made it more usable. The page on chrome used less cpu but it's probably because it was not a foreground application and chrome put some restriction upon that.

@kevinsawicki
Copy link
Contributor

funny thing is I can't save cpuprofiles anymore from devTools they all end up with 0 bytes.

This was fixed today in #7413

@drFabio
Copy link
Author

drFabio commented Oct 3, 2016

Should I be able to save timeline as well? It seems my problem is that the audio stops or chops on rendering when the cpu is too high. Chrome does not seem to behave the same way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/need-info ❌ Cannot proceed without more information
Projects
None yet
Development

No branches or pull requests

4 participants