I am working on a package (https://atom.io/packages/code-annotations if anyone is interested ) and try to improve the
activateTime (the one that is shown in the
My problem is that the activation duration is about 4x times greater than the 2nd “slowest” package (see the screenshot). During development I have Atom open in dev mode. I have read that in dev mode things might start up slower than in non-dev mode and of course console logging also slows things down but the ratio (4x) is weird.
So I started looking how the
activateTime is measured. https://github.com/atom/atom/blob/master/src/package.js seems the right place.
I have measured the duration of the
activate method itself and it wasn’t long. So I figured the reason is some of the other activation functions called in
package.activate i.e. activating keymaps, menus, stylesheets which I don’t have many of.
So the question is: What specific activation is taking so long?
Since I assume it’s not directly my code, could it be that using ES6 (
'use babel') causing Atom to transpile code makes the package slow?