Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Improve Atom startup time #756

Closed
wants to merge 2 commits into from
Closed

Improve Atom startup time #756

wants to merge 2 commits into from

Conversation

walles
Copy link

@walles walles commented Nov 18, 2016

Before this change, activation was done on Atom startup, whether or not
you actually had any Javascript files open.

With this change in place, we postpone activation until the Atom
Javascript grammar's first use.

This improves startup time of my Atom by about 180ms, thus fixing one of
the top startup time offenders according to TimeCop.

For some frame of reference, I have 87 packages installed, and Timecop
lists all packages with startup times above 5ms.

Before this change, activation was done on Atom startup, whether or not
you actually had any Javascript files open.

With this change in place, we postpone activation until the Atom
Javascript grammar's first use.

This improves startup time of my Atom by about 180ms, thus fixing one of
the top startup time offenders according to TimeCop.

For some frame of reference, I have 87 packages installed, and Timecop
lists all packages with startup times above 5ms.
@Arcanemagus
Copy link
Member

Unfortunately I'm going to have to close this on this package, as ESLint is flexible enough that it gets used on many different odd languages, so the allowed scopes (languages) are actually configurable. This means that the activationHook would potentially block the package from running if somebody has configured it to work with a more esoteric language.

If you can think of a way around that though I'd love to do so!

@walles
Copy link
Author

walles commented Nov 19, 2016

This is more of an architectural suggestion, and I have no idea how realistic it is, but from a usability perspective all linters and probably lots of other plugins could be delayed until after the user has actually started editing.

Would it be possible to have an activation-hook like functionality that just delays activation of a package until after the user has gotten a UI where they can start editing?

@Arcanemagus
Copy link
Member

Possibly? As far as I know the only activationHook's that are currently available are the language-package-name:grammar-used hooks.

Once atom/atom#13200 is released to stable, that would be an interesting candidate for packages like this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants