Apparently some versions of Electron apps can slow down Tahoe because they are messing with private APIs that then cause a slowdown across all of Tahoe. Naturally this then gets blamed on every other piece of software the user might have.
There is a tool created by Craig Hockenberry that can detect offending apps, and it found quite a few on my system, including some that are both up to date and I still use frequently.
So if you are using Tahoe, or planning to upgrade soon, it might be worth looking at that.
A simple way of listing all the Electron apps on your Mac is to open a Terminal window and execute this command: (I came up with this idea because I prefer not to download software.)
grep -a -i -l -r "electron" /Applications
On my system this command took nearly an hour to execute. There were 5006 reported files found, but many of those results were probably false positives. (Most of the potential false positives were found within files in the Numbers and iMovie packages.)
The problem is that the command isn’t specific to Electron apps that may cause the problem, so you get tons of false positives. Here’s a script that I found linked from one of the pages above; I don't recall which page:
for f in /Applications/*/Contents/Frameworks/Electron\ Framework.framework/Versions/A/Electron\ Framework; do
app=${f#/Applications/}; app=${app%%/Contents/*}
# Get Electron version
ev=$(rg -a -m1 -o -r '$1' 'Chrome/.*Electron/([0-9]+(\.[0-9]+){1,3})' -- "$f")
[ -z "$ev" ] && ev=$(rg -a -m1 -o -r '$1' 'Electron/([0-9]+(\.[0-9]+){1,3})' -- "$f")
# Ripgrep the binary for _cornerMask
if rg -a -q -F "_cornerMask" -- "$f"; then
echo -e "\033[31m❌ $app \033[2m(Electron ${ev:-})\033[0m"
else
echo -e "\033[32mâś… $app \033[2m(Electron ${ev:-})\033[0m"
fi
done
Note that this script does require a piece of external software, ripgrep, which you can install via Homebrew (and probably MacPorts) with brew install ripgrep. So it's probably not for you, Airy :). But I like that I can see all of the script's code, and ripgrepis open source if you want to dig into it. (It also seems generally useful, beyond this script.)
The script runs in seconds on my (admittedly not overly loaded) MBP, and returns a list of Electron apps that use the bad version of Electron:
Your solution is amazing and awe-inspiring. Still, I prefer my solution, because it’s much easier to trust a simply command that I can see with my eyes. It’s not so much that I distrust open-source, it’s more that I like to roll my own solutions. I feel accomplished when I do that.
Right, but what I'm saying is you now have a list of 5,000 apps, and you have no idea which ones might be slowing down your Mac. You need to add a check for the Electron version in your script, not just the presence of Electron.
I'm not enough of a regex wizard to figure out which version number they're checking for, but from reading the Electron release notes, you only need to worry about versions below v39.0.0-alpha.7 (39 final isn't out yet, but checking for just 39 should be sufficient).
Of course you are 100% right. But I found it very enlightening just to see that some of my apps were indeed Electron apps, and I didn’t even know it. Even though 95% of my command’s output are false positives, the ones that were true positives were easy to spot and the process was enlightening for me.
That's where I'm confused: How can you tell? You need output that includes the version of Electron bundled in each app. I don't see that in your output?
As I wrote, “I found it very enlightening just to see that some of my apps were indeed Electron apps,” which meant that the only thing my command does is list which apps were Electron apps. My version does not provide any information about the version of the Electron code. And as I said, it contains many false positives. I never meant to convey the idea that my command does the exact same thing as the utility in Peter’s first post. But if I misled you, I apologize. My “solution”, which was perhaps a poorly selected word, simply lists which apps are Electron apps.
nice. are the double backslashes in the first line intentional? they give an error for me and removing them fixes it. later on they mess with the ANSI escape codes. (maybe a copy-paste error?)
Sigh, no, that was me fighting the forum's new-fangled "type in formatted mode" feature, which absolutely sucks. I finally figured out how to turn it off, but forgot to double-check the posted code. I've now fixed the original post; thanks!