-
Notifications
You must be signed in to change notification settings - Fork 129
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
Squirrel-based Install Dialogue Burns CPU/Fans on Mac #247
Comments
Please note we found a workaround on the linked issue. Not sure if that's something that can be fixed here or not. |
This is a very annoying and long-standing problem, and it would be great to get it fixed. The workaround that @ambroselittle refers to in the comment above is not a real solution, because it involves chown-ing the application to the current user, which is not something that you want to do from a security point of view. The problem occurs whenever the dialog "An update is ready to install." is on the screen, asking for an admin password; as long as this dialog is open, there's a very high CPU usage. I've seen this happen consistently in all apps that use Squirrel, e.g. WhatsApp, Signal, VS Code, and others. It is a problem because many times these apps start the update process in the night, so when I come to the machine in the morning, it's been running with fans on full speed for hours already. And it's particularly problematic when you use the VS Code Insiders version, because then there's an update every day (or night). So I tried to investigate a little where this comes from. Running Instruments seems to indicate that it comes from https://github.com/Squirrel/Squirrel.Mac/blob/master/Squirrel/SQRLZipArchiver.m#L70, which seems to be called repeatedly while the dialog is open. I don't understand enough about Cocoa and ReactiveCocoa to say what's the best fix for this; one wild guess is that you should set |
Just a friendly ping. Anybody? Cc:ing @jspahrsummers who touched this code last. |
Very sorry, but I haven't worked on this codebase in ~6 years. I'm not knowledgeable about it anymore. |
Since all Electron applications that make use of Electron's Auto Updater API (e.g. (Visual Studio Code, Atom, Slack, to name a few) are affected by this transitive dependency on Squirrel.Mac, and given #247 (comment) and #256, I've raised the issue with Electron electron/electron#29119. Electron is already carrying patches for Squirrel.Mac https://github.com/electron/electron/tree/master/patches/squirrel.mac |
After I finally invested the time to investigate why that is still occurring regularly even on newer Macs, I stumbled upon this issue. I'm a bit confused that it does not have more attention as it at least annoys me regularly and must be burning a lot of energy for nothing. |
For some reason even though the `NSTask` is terminated the file handle is still being read. Fixes #247 Verified locally using the electron test suite and `chown nobody:nogroup Electron.app` during the test suite
For some reason even though the `NSTask` is terminated the file handle is still being read. Fixes #247 Verified locally using the electron test suite and `chown nobody:nogroup Electron.app` during the test suite
Please see this bug filed with VS Code for context/details. They suggested I file this with you since they are using this framework.
Let me know if you have any questions!
The text was updated successfully, but these errors were encountered: