Github: [Cause Identified] Atom-Helper is at 60-130 Percent Energy Impact Atom 1.36.1 Mac OSX 10.14.4

Created on 4 May 2019  Â·  5Comments  Â·  Source: atom/github

Prerequisites

Description

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).

Steps to Reproduce

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 :14 Uncaught (in promise) TypeError: Cannot read property 'ahead' of undefined
at Present.getAheadCount (/Applications/Atom.app/Contents/Resources/app/static/:14:3421711)
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.

Versions

Atom 1.36.1, Macbook Pro, Mac OSX 10.14.4

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.

All 5 comments

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 .git and 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:

  1. cd ~
  2. mkdir ~/test-home-git
  3. atom-nightly --safe test-home-git
  4. Everything is ok at this point, CPU for Atom in Activity Monitor shows 1% - 5%
  5. Quit Atom
  6. git init
  7. atom-nightly --safe test-home-git

At this point, the CPU for one of the Atom Nightly Helper processes spikes relatively quickly and hangs around 70% - 90%. I initially see this:

unsupported-directory

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

too-many-changes

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

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.

Was this page helpful?
0 / 5 - 0 ratings