Atom-Helper is at 60-70 Percent Energy Impact at the moment I open a js File.
Went through all steps in the debug guide (safe mode, move preferences, reinstall Atom).
Open any project (directory with JavaScript/HTML files).
Expected behavior: [What you expect to happen]
Low Energy Impact < 5 Percent
Actual behavior: [What actually happens]
Energy Impact spikes at 130 and settles between 60-80 Percent
Sample / Call Graph:
https://gist.github.com/i3games/0c38503eb14ad60d78a4a54831003f8a
Error in Atom console:
VM22
at Present.getAheadCount (/Applications/Atom.app/Contents/Resources/app/static/
at
at process._tickCallback (internal/process/next_tick.js:188:7)
Reproduces how often: [What percentage of the time does it reproduce?]
always
It does not happen on opening New Window without any project, but it does happen without a file being displayed (no tab open). It also happens when tree view is hidden.
Atom 1.36.1, Macbook Pro, Mac OSX 10.14.4
I found the cause for this behaviour in the Atom git integration. My complete home directory was under source control (unintended) with an initialised git repository. After rm -rf .git and restarting Atom, the Energy Impact normalises to 0.1.
The hint actually came from VS Code who throws a warning about a large repository in home on startup; apparently IntelliJ does the same. The recommendation would be to implement this in Atom as well.
Thanks for the report and for sharing your findings:
I found the cause for this behaviour in the Atom git integration. My complete home directory was under source control (unintended) with an initialised git repository. After
rm -rf .gitand restarting Atom, the Energy Impact normalises to 0.1.
There was an older issue where Atom crashed when someone had a .git/ directory their home directory and that issue was resolved (/cc https://github.com/atom/github/pull/1153) but I have seen issues since where people have noted problems like this when they had a .git/ directory in their home directory.
I'll see what behavior I can reproduce.
This is interesting because I'm almost certain we have handling for git repositories in / or ${HOME}. Maybe our handling regressed somehow? Let me know what you find, @rsese...
Looks like I can reproduce - this is what I did using 1.38.0-nightly17 on macOS 10.12.6:
mkdir ~/test-home-gitatom-nightly --safe test-home-gitgit initatom-nightly --safe test-home-gitAt this point, the CPU for one of the Atom Nightly Helper processes spikes relatively quickly and hangs around 70% - 90%. I initially see this:

But after a few seconds, I see the same error in console mentioned in the report and now I see this:

The CPU remained high for the 5-ish minutes I left Atom open before quitting.
Hope that's helpful @smashwilson, let me know if you'd like me to try anything else :v:
I do not have any git repos in root of my my home directory, but plenty in sub directories. I am having ongoing CPU issues when using this package. Here are my specs:
MacOS 10.14.3 (18D109)
Atom 1.42.0
I have not had any cpu issues in several months. I'm guessing updates have addressed and fixed most of these issues.
Most helpful comment
I do not have any git repos in root of my my home directory, but plenty in sub directories. I am having ongoing CPU issues when using this package. Here are my specs:
MacOS 10.14.3 (18D109)
Atom 1.42.0
Updated July 9, 2020
I have not had any cpu issues in several months. I'm guessing updates have addressed and fixed most of these issues.