-
Notifications
You must be signed in to change notification settings - Fork 96
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 as of v4.13.0 #461
Comments
The selected one is a renderer/web/@chromium process but it's hard to say just by the screenshot which part of the functionality it's related to (@ProtonMail web clients or app's UI). I'm not seeing any intensive CPU load at my side (Linux). |
I think the issue started after I enabled the "custom actions" menu, but that is blind speculation on my part as it could've been a coincidence. I can help by debugging the code on my computer. I cloned the code and installed the dependencies, but I can't find a way to run the app without building it so that I can use debugger tools to profile the code.
Can you guide me through the debug process? I have experience with JavaScript and NodeJS, but I am not really familiar with other tools, especially TypeScript. |
I thought maybe I missed properly disconnecting the
It's the same build steps as listed in readme (excluding the packaging step), but at the end run |
Build command: |
Thanks for the instructions, but for some reason yarn is giving me errors, I ran the command from your post as well as the one from README: https://bpa.st/2QUA (output is too long so I pasted on an external site) |
I missed the fact that you will need to build @ProtonMail clients by running |
I did what you asked, and ran
I think we can debug this more efficiently if we can communicate in real-time, do you use IRC or Matrix? |
My bad, I didn't update the |
Sorry, but I'm ready to provide live support at this time. |
Direct run worked... but unfortunately the native build artifacts were compiled with an older version of node, so I can't use them:
I will try building ProtonMail myself. |
A native dependencies. You need to run
Nope, it's not about @ProtonMail. Those are native dependencies used by the app. |
Oops, my bad, I missed that command. I ran it again and the app is running 👍 I have encountered another issue though, I am getting this error while logging in;
My fan is not spinning at full speed yet, so the resource-consuming loop isn't triggered at this point. |
Make sure you properly unpacked the @ProtonMail web clients (see #461 (comment)). After doing that unpacking/renaming you need to run
At this point it's only the app stuff is running, no @ProtonMail involving yet. You are almost there. |
Awesome, thanks for assistance, I am able to run the app now. But I couldn't reproduce the 100% CPU usage... so I tested with the pre-built release version and it still is eating up 100% of the CPU. It only happens once I load an email, so I guess it has to do something with the specific version/build of the ProtonMail stack? @vladimiry Did you test the release build? Perhaps you might be able to reproduce it too. |
See #461 (comment)
|
Sorry for not explaining properly, I mean the exact binaries that are uploaded for the release, I think a very specific version of ProtonMail stack might be responsible... Your dev environment might be using a different stack which doesn't have this "bug". |
I too have high CPU usage since the update. |
Can you test the build shared in #460 (comment) (it's v4.13.0 but with downgraded @electron)? |
@vladimiry This build is working without performance issues! Hardly any CPU is being used during idle now :) |
Great, so you have got a workaround for now. It means that the issue lies somewhere in @electron since 16.0.0-beta.8 => 15.3.1 downgrade did the trick. |
Just confirming that the build is working for me too on Windows 10. |
So it's not system-specific as the issue reported to be happening on Linux and Windows 10. I will consider publishing a new release with downgraded @electron if more reports get posted here. But would prefer to first make a new build based on a stable @electron v16 (it's going to be released next week). |
I am experiencing high cpu usage on Windows 11 as well since last update |
@fusionneur does #461 (comment) help? |
Can someone who had CPU usage problem before test this v4.13.2 RC build? Changelog draft:
|
Just tried the RC, and the issue has returned on my Arch Linux machine. One of the processes is again maxing out one thread. (Even after a restart) Edit: Also happens on my Arch laptop. |
@brandon-doornbos, thanks. That RC build is based on recently released @electron 16.0.6 which includes @chromium bump so I thought maybe the issue got fixed somewhere upstream in @chromium. So will be releasing a new version built on old/v15 @electron.
Doesn't happen to me on Linux for some reason. |
Weird, what distro do you use? Edit: Ok, maybe it's just really hit or miss, there are like 3 different issues about cpu usage on the electron GitHub, one on Windows 7 and 2 on MacOS from a quick glance. |
It's Manjaro (Arch based). I would not ask someone to test the build if I could reproduce the issue at my side. To face the issue, do I need to perform a specific action in the app or just start it and login into the proton account?
Please list them here. I don't believe though that @electron contributors will start actively looking into it until the minimal repro project gets provided (which normally hard to do for such kind of issues). Btw. Notice the below note. So if you use persistent session feature you will have to keep using that RC build or login again if you prefer downgrading to a stable release (new release is coming soon). The reason is that @ProtonMail changed the session credentials storage format in an updated web clients.
|
I tried it fresh on my laptop today, and the only thing I did was install the RC pacman file and then login. This did not do anything so then I closed the app and opened it again and upon logging in, one full thread utilized. On my PC, where I already had the previous version, I just installed the RC and it immediately did it upon logging in.
electron/electron#31916, which lists siyuan-note/siyuan#3507, which I can't read. The other one I found was for a different version, sorry. I just can't fathom what would cause this, as it is consistently happening to both my Arch machines but not your Arch based machine. |
The app's code need to be compiled in "dev" mode in order to be able to open dev tools (I think it's a web/renderer process is a problematic one). There is no documentation on this matter yet. Building and running the app in dev mode is not a complex process but time-consuming, similar to what described in https://github.com/vladimiry/ElectronMail#building-locally. Debugging of the main process can be achieved as listed in https://www.electronjs.org/docs/latest/tutorial/debugging-main-process but I tend to think that it's not the main process causes the problem. |
Yes it's clear that it's a renderer process since we got screenshot provided in #461 (comment). |
What about this build (Electron: 15.3.4)? if it runs well I will be publishing it as a new release then. |
Yep, no problems. BTW, i built the thing and a dev build, so I'll see if I can find something. |
Hello again, well I could not find anything with just the normal debugging tools, and if I would want to debug electron itself, well, debug symbols. The whole electron repository doesn't even fit on my drive so that's a no. Let's hope that this gets fixed accidentally someday. Edit: By the way, keep up the great work, this is an amazing project and your support with this issue has been great :). |
What about this build (built from wip-electron-18 branch on recently released @electron v18.0.0-alpha.1)? Still causing issue? |
Yep, this one has the high usage again :(. |
Thanks for the test. So it's confirmed that newest @electron v18 alpha is unfortunately also affected. |
@brandon-doornbos can you test this build? It's the same v4.13.6 release but assembled on recently published @electron v19.0.0-alpha.1. Anyone else is also welcome to test the build. |
The high usage does not seem to affect me with this build, so it may actually be fixed. We probably need other people from this thread to confirm it though. (I'm still on the same platform) |
no cpu usage for me as well (~0.5% cpu while in tray with multiple accounts) |
Good call, after using the build for a while longer, the problem seems to have returned. A renderer process is again fully stressing out a single core :(. |
Asking to share the CPU and GPU type used (including integrated graphics) as it might potentially help to narrow down the scope. Also maybe someone who can reproduce the issue could try running the app with disable-like GPU/rendering-related command-line switches from the https://peter.sh/experiments/chromium-command-line-switches/ list (you would run the in-page search by the |
I've got an R5 1600 and an RX480, so no integrated graphics. It consistently hits one core when I start the app, then if I switch to another account and close the app, it often fixes itself. So maybe it is related to residual processes. The behavior is the same in X11 and Wayland. List of command line arguments I've tried:
|
Can someone test the electron v19 based build (build log / changes)? There is a hope that the following changes will make some effect: updated proton clients, updated electron, dropped MutationObserver use in the project. |
Well this may finally be it :). |
Thanks for the feedback. If possible, please keep using this build for a while. Hopefully, the next app release switches to the recent @electron version (v15 => v19). |
Still haven't found any issues, after multiple days, many restarts and actual usage. Also, thank you for continually thinking of us :). |
Testing out again today on Windows 10. Only been ~5 minutes but so far looking fine. I'll report back. |
Looking fine, pretty confident the issue is resolved in v5.0.1. |
Hi, I upgraded to
v4.13.0
recently and noticed that my fans were spinning even though I wasn't doing any CPU intensive tasks. Upon inspections it looks like one of the threads belonging to ElectronMail were the cause:Maybe it's due to some kind of continuous event loop?
OS: Arch Linux
The text was updated successfully, but these errors were encountered: