atom-language-idris icon indicating copy to clipboard operation
atom-language-idris copied to clipboard

Should have a much better startup time

Open archaeron opened this issue 10 years ago • 6 comments

Trades the startup time for slower execution of the first command #28

@alexchandel could you take a look at this?

archaeron avatar Feb 19 '16 13:02 archaeron

@archaeron Sure, how can I install it? Also, can I ask why these commands use so much time, if they're not even invoking the idris compiler?

alexchandel avatar Feb 23 '16 17:02 alexchandel

Installation:

You need to clone it into your .atom/dev/packages directory and rename the folder to language-idris or the package settings won't get picked up. Then you need an apm install from the language-idris folder to install the dependencies. And there you can also change branch. to issue-28. You then need to start atom with atom -d a/folder to start atom in dev mode (where packages in the dev directory are loaded)`.

To answer the second question: I don't know. just requireing the classes, without actually using them adds about 200ms to the startup time. Which is really strange.

archaeron avatar Feb 23 '16 17:02 archaeron

@archaeron Possibly an atom bug? Alternatively can we precompile the package so its requirements are all inlined?

alexchandel avatar Feb 23 '16 18:02 alexchandel

This appears to speed up startup, though it's sad that the first command run now slightly lags.

alexchandel avatar Feb 23 '16 18:02 alexchandel

Maybe some dependency I use executes some code on require?

I should try to find out which dependencies have the most inpact on the loading time.

archaeron avatar Feb 23 '16 20:02 archaeron

That's a good idea. It could even be a single dependency that's doing work on require. You could probably bisect them pretty quickly (loading half at startup & checking whether startup is slow, then try the other half or recurse).

alexchandel avatar Feb 24 '16 15:02 alexchandel