atom
atom copied to clipboard
High CPU usage for temporary files
Hello,
I'm not sure how I can describe this with any debugging from Atom, so let me know if you need anything.
Basically, I have a project using a sqlite DB, and while running a script, sqlite is creating a journal file that pops in and out of existence multiple times every few milliseconds. Having file-icons
enabled is using +60% cpu and after a few hours of running will crash Atom.
As soon as I disable file-icons
, cpu drops down to 15% usage, which I'll attribute to Atoms tree parser.
Not completely sure if its file-icons
or Atom causing the crashing at that point. I'm testing their other File System Watchers.
I'm also not sure if file-icons
even has an image for a db.sqlite3-journal file, so I wouldn't think the default image would be hitting the disk so hard.
Versions Atom==1.35.0-beta0 file-icons==2.1.30
I am running a first-time script to load a data set into my database, so this isn't a routine task. If that means this isn't an important issue, you can just close this.
👋 Hey @DallasO, thanks for the detailed report.
The spike in CPU usage sounds strange. Granted, file-icons
isn't as performant as it should be (I intend to rewrite the filesystem layer eventually…), but crashing isn't something that should be happening.
How big is the project? If the tree-view
has a mammoth numbers of files and directories open (as in, thousands), then yes, unfortunately the CPU drain will be noticeable.
Also, what system are you running, and what other packages do you have installed/activated?
:wave: Its not that big of a project, less than 100 files.
System: Linux (Debian 10)
Packages, not including the core Atom packages: atom-beautify==0.33.4 atom-html-preview==0.2.6 atom-increment==0.3.4 atom-minify==0.8.0 busy-signal==1.4.3 color-picker==2.3.0 file-icons==2.1.27 git-log==0.4.1 highlight-selected==0.14.0 html-entitize==1.1.0 intentions==1.1.5 language-smarty==1.8.0 linter==2.2.0 linter-stylelint==4.3.2 linter-ui-default==1.7.1 minimap==4.29.9 minimap-autohider==1.6.0 minimap-find-and-replace==4.5.2 minimap-highlight-selected==4.6.1 minimap-pigments==0.2.2 minimap-split-diff==0.3.7 open-in-browser==0.5.2 pdf-view==0.71.0 pigments==0.40.2 split-diff==1.5.3 sync-settings==0.8.6
pdf-view==0.71.0
Ah, that reminds me. I've recently witnessed Atom crash a few times after opening a PDF (and having the console open). It just... hang for a long time, and the workspace vanished with an "Atom has crashed." system dialogue. Wondering if there isn't a connection there. 🤔
BTW, file-icons
won't perform any I/O if you have the Hashbang, Modeline and linguist-language
strategies disabled. You can turn them off by opening the package settings and unchecking the relevant strategy checkboxes. 👍 That might alleviate the system overhead. If not, well... it's another package's fault. 😅
:laughing: Haha. OK. I'll keep playing around and see if I can narrow it down.
Thanks!