You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Hi, i have used Textmate for a loong long time. But also as a big fan of new things, i decided to try Atom for curiosity purposes.
It turns out that i found Atom a great platform for day-by-day development, and im using it Atom now. But theres one thing annoying me:
I usually open Atom using the Shell command "atom [filename]", and compared to "mate [filename]" (the same command Textmate use for open files using Shell), Atom is incredible slow (i feel i have to wait twice of the time, like 1s~2s).
I know this performance also is related to machine specs, processors, memory and etc. But its the exactly same task executed for different tools.
I can record a video showing that behavior if you like.
Also, if this is a un-prioritize known issue, i can submit a pull request if theres noone working on it. I just need to know where to start looking.
][`s
Reacted by Gabriel Perren, Luke Deen Taylor, Andrew Powell, James Harris, Erik Nilsen, Dan Gold, Jimmy Callin, Bernhard Häussner, Clément, Roman Hinex and 55 more
Before you start digging into this, you might be able to speed it up by disabling some packages.
Open time cop (cmd-shift-p search for time cop)
Or open atom --safe which opens with only core packages enabled
Probably digging into the code would be easiest. If it were me, I would profile first, then for the slowest parts, dig around in that code and see what is going on.
Also, this is probably death by 1000 paper cuts. There will be no one thing that is a huge slowdown. With no files open and no treeview open, it opens in 500ms for me. With one medium size file and the tree view open, it takes ~1 second. There are 100 things involved with that extra 500ms. Reading the directory, Treeview rendering, reading the file, tokenizing, buffer rendering, etc. Each of those things might have small things to speedup.
If you want to start small, the slowest builtin packages to load / activate are markdown preview and the treeview (they take a total of 150ms on my machine). Maybe there are things to speedup there?
Yeah, im looking into that right now. There are 67 core packages loading here. With atom --safe, 223ms was spent on packages loading (67 packages), and 262ms was spent on package activation (60 packages). At all, 485ms was spend on package loading and activation.
I think the key point here is delay some packages to load after start. Because sometimes, the first essential is only content, identation and menu. Treeview, bracket matcher, markdown-preview, and even status bar are not theorically essential to see the raw contents of a given text file.
Bottomline i agree with you, its death by 1000 paper cuts. But also, i think its a matter of loading things when they are really required. For instance, when you type "atom .", you are probably looking first for the whole structure of a given folder. But when you type "atom myfile.txt", you are probably looking first for the content of this file, so you probably wont worry about not having the Treeview on the first second. And its just that we are talking about, a single second.
Async loading of the packages has been talked about a lot in the past. There are some strong opinions about it. I can see the non-essential packages being loaded async. I'll try to dig up some of those old discussions tomorrow.
One thing that I've done with a few of my packages (even the small ones) is I've lazy-loaded everything possible. Like with my tabs-to-spaces package I create commands that first load the code and then executes it:
I've generally found that this kind of lazy-loaded package is faster (at least for initial startup) than using activationEvents from the Timecop view's perspective.
I just decided to try Atom on OS 10.8 on an (older) Macbook Pro and it is very slow. Opening a new window particularly. Timecop also drastically under-reports total window load time from the user perspective, and the sub-categories' times do not remotely add up to the total time, so I'm not sure where all the extra is coming from.
E.g.: timecop usually shows a "window load time" of between 1500ms and 3000ms, although there was one 10000ms that I haven't been able to repeat so far. It seems highly variable. But my stopwatch (from the moment I run atom --safe from the command line) generally reads 4-8 seconds. This is with Atom running in the Dock so app startup is not included.
For comparison running subl (or subl . which loads a files view) with Sublime Text 2 running in the Dock is practically instant. I cannot manually time it.
When I have time I'll try the profiler code you mentioned.
@countergram The window load time is the time for that render process to load, there is a parent process that also loads when the app launches and creates the window> I'll add that time separately in TimeCop so they can be differentiated, thanks for mentioning this.
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of Atom
Comment that the issue is still reproducible and include:
What version of Atom you reproduced the issue on
What OS and version you reproduced the issue on
What steps you followed to reproduce the issue
Issues that are labeled as triaged will not be automatically marked as stale.
Reacted by dc, Saran Tanpituckpong ✔️ and Kevin Zhu
Yeah, I'd just like to bump this as well and add my +1 (Latest build, Arch Linux). It's ridiculous that with an SSD, Ryzen 3600, Fury X, and 16GB of ram it takes ~5-7 seconds to launch atom. I primarily use atom to edit small files when nano won't cut it, but if it's going to take longer to open it than VSCode then it's not worth it.
Same. I use vim for extremely snappy edits, VS Code for debugging, and Atom for everything else. I hate vim. I really want to replace it with Atom. Is the init script execution already asynchronous?
5-7 seconds? On a maxed out Mac M1 it takes about 30 seconds. That's what we get for the decline of competency and the rise of cheap, fast packed web apps. Even in software dev people keep killing quality over easier and faster profits.
@Xaeroxe In our opinion these multi platform electron website apps are a step backwards in terms of cpu, ram, disk storage and battery usage. Electron apps running their own chromium browser.
But hey, they are multi platform and html and javascript, etc.
I'm not here to talk about the performance of electron and whether it's good or bad. I'm here to remind people that
Open source maintainers owe you nothing.
Wandering into an issue tracker and calling everyone incompetent is never useful.
If you don't like Electron, why are you here? There are non-Electron editors out there, and Atom is always going to be an Electron product. Changing that would require starting from scratch, at which point you're no longer hacking on Atom. I don't know what you're trying to accomplish by bringing the Electron discussion here.
It's not running "emulated".
Electron supports M1 for over a year "natively" now.
The same issue exists on my I9 MBP 2018.
Other Electron apps (including ones I developed) do not, even remotely, have such issues - like the mentioned VSCode.
Issues without solution, disccusions or ask for help - instead simple closures and shoving under the rug -, existing for 7+ years.. yep, I cannot call that a beacon of competence.
It's more like there's not enough contributors. There's 7 pull requests right now and VSCode had 30+ commits today, so that's not a fair comparison. 7+ years is totally normal. In fact, I chose a random number between 1 and 100000, and this vscode issue took 1 year oof to resolve (probably worse than average but still) microsoft/vscode#28965.
/rant (really unproductive comments here huh)
Anyways...
I also used the javascript profiler in the console, and here's the results when I did the reload window command:
Activity
[-]Atom slower than Mate[/-][+]Atom slower than Textmate[/+]benogle commentedon Jun 18, 2014
This is important to us, but we're not actively working on it right this second as we are focused on the react editor and windows support.
Definitely look into this if you feel inclined. I would start with profiling, and the timeline.
[-]Atom slower than Textmate[/-][+]Startup time is slow[/+][-]Startup time is slow[/-][+]Editor window startup is slow[/+]renatodex commentedon Jun 18, 2014
Great,
Where i can learn more about the project structure?
Should i dig into the code or there is some explanatory guide for starter contributors?
benogle commentedon Jun 18, 2014
Before you start digging into this, you might be able to speed it up by disabling some packages.
cmd-shift-psearch for time cop)atom --safewhich opens with only core packages enabledProbably digging into the code would be easiest. If it were me, I would profile first, then for the slowest parts, dig around in that code and see what is going on.
To create a profile for startup in https://github.com/atom/atom/blob/master/src/window-bootstrap.coffee you can programmatically start and end a profile:
benogle commentedon Jun 18, 2014
So add those lines, and open a dev window (
atom -din a code directory). Profile a couple different editor states, eg.renatodex commentedon Jun 18, 2014
Thanks Ben, i appreciate your help!
benogle commentedon Jun 18, 2014
Also, this is probably death by 1000 paper cuts. There will be no one thing that is a huge slowdown. With no files open and no treeview open, it opens in 500ms for me. With one medium size file and the tree view open, it takes ~1 second. There are 100 things involved with that extra 500ms. Reading the directory, Treeview rendering, reading the file, tokenizing, buffer rendering, etc. Each of those things might have small things to speedup.
If you want to start small, the slowest builtin packages to load / activate are markdown preview and the treeview (they take a total of 150ms on my machine). Maybe there are things to speedup there?
renatodex commentedon Jun 18, 2014
Yeah, im looking into that right now. There are 67 core packages loading here. With atom --safe, 223ms was spent on packages loading (67 packages), and 262ms was spent on package activation (60 packages). At all, 485ms was spend on package loading and activation.
I think the key point here is delay some packages to load after start. Because sometimes, the first essential is only content, identation and menu. Treeview, bracket matcher, markdown-preview, and even status bar are not theorically essential to see the raw contents of a given text file.
Bottomline i agree with you, its death by 1000 paper cuts. But also, i think its a matter of loading things when they are really required. For instance, when you type "atom .", you are probably looking first for the whole structure of a given folder. But when you type "atom myfile.txt", you are probably looking first for the content of this file, so you probably wont worry about not having the Treeview on the first second. And its just that we are talking about, a single second.
I dont know if its reasonable, what do you think?
][`s
benogle commentedon Jun 19, 2014
Async loading of the packages has been talked about a lot in the past. There are some strong opinions about it. I can see the non-essential packages being loaded async. I'll try to dig up some of those old discussions tomorrow.
lee-dohm commentedon Jun 19, 2014
One thing that I've done with a few of my packages (even the small ones) is I've lazy-loaded everything possible. Like with my tabs-to-spaces package I create commands that first load the code and then executes it:
I've generally found that this kind of lazy-loaded package is faster (at least for initial startup) than using
activationEventsfrom the Timecop view's perspective.countergram commentedon Jul 24, 2014
I just decided to try Atom on OS 10.8 on an (older) Macbook Pro and it is very slow. Opening a new window particularly. Timecop also drastically under-reports total window load time from the user perspective, and the sub-categories' times do not remotely add up to the total time, so I'm not sure where all the extra is coming from.
E.g.: timecop usually shows a "window load time" of between 1500ms and 3000ms, although there was one 10000ms that I haven't been able to repeat so far. It seems highly variable. But my stopwatch (from the moment I run atom --safe from the command line) generally reads 4-8 seconds. This is with Atom running in the Dock so app startup is not included.
For comparison running
subl(orsubl .which loads a files view) with Sublime Text 2 running in the Dock is practically instant. I cannot manually time it.When I have time I'll try the profiler code you mentioned.
kevinsawicki commentedon Jul 24, 2014
@countergram The window load time is the time for that render process to load, there is a parent process that also loads when the app launches and creates the window> I'll add that time separately in TimeCop so they can be differentiated, thanks for mentioning this.
235 remaining items
Jacalz commentedon Nov 24, 2018
To be quite honest, this is still really slow. Would like to see this improved dramatically, just look at vscode, it has way better startup time...
stale commentedon Nov 24, 2019
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Issues that are labeled as triaged will not be automatically marked as stale.
benwhalley commentedon Jan 9, 2020
It might be worth keeping this issue open as startup time is still not that snappy (latest build, OS X).
MartinX3 commentedon Aug 24, 2020
Yes, it's way too much. (Latest build, Arch Linux)
boredhero commentedon Feb 9, 2021
Yeah, I'd just like to bump this as well and add my +1 (Latest build, Arch Linux). It's ridiculous that with an SSD, Ryzen 3600, Fury X, and 16GB of ram it takes ~5-7 seconds to launch atom. I primarily use atom to edit small files when nano won't cut it, but if it's going to take longer to open it than VSCode then it's not worth it.
ThatXliner commentedon Feb 9, 2021
Same. I use vim for extremely snappy edits, VS Code for debugging, and Atom for everything else. I hate vim. I really want to replace it with Atom. Is the init script execution already asynchronous?
ventr1x commentedon Sep 29, 2021
5-7 seconds? On a maxed out Mac M1 it takes about 30 seconds. That's what we get for the decline of competency and the rise of cheap, fast packed web apps. Even in software dev people keep killing quality over easier and faster profits.
Xaeroxe commentedon Sep 29, 2021
@ventr1x that's running emulated. Please reconsider your tone when making comments, you're not making friends or progress with that attitude.
MartinX3 commentedon Sep 29, 2021
@Xaeroxe In our opinion these multi platform electron website apps are a step backwards in terms of cpu, ram, disk storage and battery usage. Electron apps running their own chromium browser.
But hey, they are multi platform and html and javascript, etc.
Xaeroxe commentedon Sep 29, 2021
I'm not here to talk about the performance of electron and whether it's good or bad. I'm here to remind people that
If you don't like Electron, why are you here? There are non-Electron editors out there, and Atom is always going to be an Electron product. Changing that would require starting from scratch, at which point you're no longer hacking on Atom. I don't know what you're trying to accomplish by bringing the Electron discussion here.
MartinX3 commentedon Sep 29, 2021
I dislike safe-spaces, they kill progress of any kind.
So I write critics about stuff I tried, but not use anymore, because of its disadvantages.
ventr1x commentedon Sep 29, 2021
It's not running "emulated".
Electron supports M1 for over a year "natively" now.
The same issue exists on my I9 MBP 2018.
Other Electron apps (including ones I developed) do not, even remotely, have such issues - like the mentioned VSCode.
Issues without solution, disccusions or ask for help - instead simple closures and shoving under the rug -, existing for 7+ years.. yep, I cannot call that a beacon of competence.
icecream17 commentedon Sep 29, 2021
It's more like there's not enough contributors. There's 7 pull requests right now and VSCode had 30+ commits today, so that's not a fair comparison. 7+ years is totally normal. In fact, I chose a random number between 1 and 100000, and this vscode issue took 1 year oof to resolve (probably worse than average but still) microsoft/vscode#28965.
/rant (really unproductive comments here huh)
Anyways...

I also used the javascript profiler in the console, and here's the results when I did the reload window command:
