CPU usage while idle and active (but not when minimized)


#1

Hello, it has been a while for me that atom became sort of worse on eating my CPU. I cannot tell you since when but approximately it behaved better around half a year ago.

I have the following problem. Atom launched with atom --safe and with one opened plain text file with 20 lines still uses some CPU (~3-5%) when the cursor is in the text somewhere.

I have measured a profile file with the following settings:

  • 30 seconds atom active but cursor in dev-tools window
  • 30 seconds one cursor in the text file
  • 30 seconds 5 cursors in the text file
  • last seconds atom minimized with one cursor in text file

You can find it here:
https://drive.google.com/open?id=1NkCqAiavsttXCbk2Jra1j5eWm-i5iOEm

One clearly sees the difference but I do not know what exactly causes this changes.

In this trivial test case things would be still ok but with 3 atom instances and ~20 packages I hit a mark of 50% of my 4x2.5 GHz cores used for running atom and this is not an acceptable situation. I know, that packages of cause eat some CPU but still, while minimizing all (e. g.) three atom instances the CPU usage decreases like in this test case.

Does someone has an idea of what I could do to improve this. Because I cannot use atom in a way I would like to because of this.


#2

One possibility here is that this is caused by the filesystem watching library. The “native” one undesirably falls back to polling in a few cases… notably, when it’s watching your config file.

Try opening the Settings View, changing the core setting “File System Watcher” to “Experimental filesystem watching library”, and restarting Atom entirely. I’d love to know if this helps or not.


#3

Hey, thanks for the answer. Unfortunately, switching to “Experimental filesystem watching library” did not brought any noticeable changes. Nor did a package to switch off the cursor blinking.

Hope, that there are also some other ideas :wink: