Why is Atom so slow?


#145

Yeah, i realize that a one time occurence is nothing too serious yet, but i was just irritated and stumbled over this discussion while searching if this is something known.

I investigated a little further and the switching between tabs happens to be slow as soon as i have a few more tabs open (>8 maybe) and havent touched one of them in a while.
Could it be, that atom is checking if the file has been modified in the meantime? That would explain this behaviour.

As already said, im not here to complain but to understand and if it IS unintentioned behaviour, i would love to help fixing it.
So far i really like this editor and i dont experience the problems with selecting yet.
Would need to test with larger files, but i doubt that would be too problematic.

Chrome itself seems to be able to handle even tables containing thousands of rows and a dozen of columns each without having big troubles (though the CPU runs warm then).

EDIT: Toyed around with some blindtext.
Selection is smooth even with 6MB of lorem ipsum wrapped in a php-string (to activate the syntax highlighting).
The funny thing is, that atom seems to fall over, when i insert too much text at once and when saving really large files.
Mine just crashed after saving the 6MB to disk, while the file got saved without problems, the editor is not responding anymore.
Gonna test some more.

EDIT2: Atom IS responsing, though the view crashed.
Reloading the view does not help though. But i can operate the menu without problems.

EDIT3: Atom seems unable to open a file of this size.
Gedit works, with a slight delay (opening instant, code highlight ~2 seconds).
Wonder whats the problem, though i probably dont open 6mb files every day, its not so funny knowing the limits.


#146

Gentlemen, I’m having my beloved Atom eating 1.4Gb of ram while having one C file opened(and it’s really small, assignment for college) and updating the only community plugin I have(not quite successfully, but that’s not the point). It starts consuming more and more memory once opened till it gets to the point of 1.4Gb, and I’m not even doing anything. That’s second package I try, first was atom-editor and on the screenshot you see atom-editor-bin from AUR. Tried running with --safe parameter, that changed nothing. I’m pretty much speechless and open to any suggestions.
Using Antergos Linux, laptop Asus X551 with Intel Celeron N2840 and 4Gb of RAM. I understand system specs are pretty low, but Atom isn’t video editor either.
P.S. I ****ing love it and I hope memory leaks get fixed so I can keep working with it, for now switching to something not so RAM-hungry.


#147

Hey guys,

All is in the title, I don’t understand my atom is so slow and use so much ram ? (See link attached)
I don’t use many package or theme, my macbook pro is from march 2015 with 8GB ram and 256SSD.

Compared to my phpstorm/webstorm or even sublime text, even if I like all the feature that atom provide and how customizable it is, I can’t run it properly for some weeks, it often freeze.

Have you some tips to fix that ?

http://img4.hostingpics.net/pics/704224Capturedecran20160313a191807.png

http://img4.hostingpics.net/pics/224520Capturedecran20160313a203809.png


#148

@buttrfly: Can you try running a CPU profile (http://flight-manual.atom.io/hacking-atom/sections/debugging/#diagnose-runtime-performance-problems-with-the-dev-tools-cpu-profiler) and uploading the results here?

@kevinrambaud: It seems like you have a lot of community packages installed - try seeing if safe mode (atom --safe) starts up noticeably faster or not.


#149

@Wliu Well, there is a noticeable improvement at start, even when using the editor. I don’t think to use so many package.
I’m using similar package on sublime text and it remains still really fast.


#150

If performance is your primary concern, Atom may not be the right editor for you. See my post above:


#151

Moving from CoffeeScript to JavaScript will actually improve performance quite considerably. We did some testing of such things on our own projects over at https://discuss.bevry.me/t/move-from-coffeescript-to-es6/30 and found CoffeeScript to produce unoptimised JavaScript (in which JIT is disabled) - moving our code to JavaScript increased performance.


#152

Sounds reasonable, I’d be interested in some numbers though. Did you try and measure the difference in performance?

Also, I have noticed there are packages that provide both, JavaScript and CoffeeScript files. I’m wondering how Atom is treating a package in this situation:

  1. will it load what’s specified as main in package.json and ignore everything else?
  2. will it prefer the JavaScript files, if no extension is specified in package.json?
  3. will it load both files?!
  4. or else

Does Atom compile all CoffeeScript files at startup and cache them? Or does it only compile files that have changed?


#153

That’s not what we saw in our testing.

Atom will load JavaScript or CoffeeScript files. It has been able to do this for a while now. It will load whatever it is told to load. The behavior if there is both a CoffeeScript and JavaScript file with the same name but differing extensions is undefined.

The short version is that Atom compiles files (whether CoffeeScript or JavaScript) at the time that individual file is loaded, if not already in the cache, and caches it. The long version, including cache invalidation, is here:


#154

Is this testing available anywhere public for interested onlookers?


#155

Unfortunately, no. One of the things that I’m trying to get the team on board with is creating a perf suite that we can run consistently between releases. The perf testing we do now is rather ad-hoc and targeted (and tossed out after we get our answer) :frowning2:


#156

It would be interesting to have a perf suite and run it against atom 1.0 release, and previous releases, and the current release to see if anything drops in performance along the way in the future releases.

Maybe something was implemented in previous releases that dropped atom performance in a area and that could identify it, i guess.


#157

When Atom will reach Sublime Text 3 performance, it will be no doub the best editor …

Currently performance on my Windows 7 is a disaster. Really lags / crushes / performance killing my will to switch editor.

My question is:

Does Atom ever can reach ST3 performance? I mean ever like 1-2 year? No like 10 years ofcourse :smiley: . Does technology in wich Atom is developing is capable to do that?

best regards


#158

This is how slow atom launches to me. Which means: more functionality - more lag.
I guess that’s how Atom works. :cry:


#159

I don’t know what’s wrong with your machine, but tree-view definitely doesn’t have to take 1967ms. You might want to try uninstalling and reinstalling everything.


#160

NO. (Post must be at least 10 characters)


#161

You can use package-sync to make a list of installed packages and then to reinstall all of them. Unless that portion of your HD is severely fragmented, that’s the only thing I can think of.


#162

@DamnedScholar is trying to be helpful. Perhaps you could give more information to go on so they could give you some more ideas?


#163

Hm… Okay, thanks.


#164

Actually there is the blink inspector in Brackets. Its shell is based on Chromium CEF.