Prioritize package loading


I think it would be nice if Atom loaded itself with the bare essentials when it gets loaded while it continues to load other packages in the background. Otherwise when you install even a few new packages load times start to suffer quite a bit.


Atom has a two-phase package initialization, load and activate. So a package can defer the vast majority of its initialization to be performed on first use. I think as Atom and its accompanying package community matures, best practices will emerge around this.


Attached to this issue is that I have a feeling that packages are essentially loaded in a random (or maybe it’s alphabetical) order. For example, I have Emmet installed, so if I type .classname and press <tab> then it’ll convert that to <Mdiv class="classname"></div>. However, sometimes the standard HTML snippets actually have priority over Emmet, which means typing .title and pressing <tab> gives me .<title></title>, and ul>li>a and <tab> gives me ul>li><a href=""></a>, etc.

I say sometimes because sometimes it doesn’t do that. I can’t say that therefore the ordering/priority is random - it may just be that my usage is random. For example, it was doing the bad stuff described above, then I disabled and re-enabled Emmet and now it’s fine. But that’s because I forced it to load Emmet after HTML snippets. It could well be the case that Emmet is always overridden by HTML snippets on a normal load and just isn’t when I do something to make Emmet load afterwards (like installing, updating or disabling and re-enabling it).

Either way, I’d like to know if there is a defined way that the packages load in, and how package authors should attack this tab priority issue (who’s to say that a given package even should be able to battle for priority over any other?).

Snippets from packages loaded in essentially random order

If you haven’t already, try running the Time Cop:Toggle command to see the timings for each package, including the breakout of load and activate times as leedohm mentioned. It is a nice piece of work.


I do quite like seeing this pane. Bit of a geekfest I guess.