rspell icon indicating copy to clipboard operation
rspell copied to clipboard

Startup takes forever

Open Lioness100 opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description of the bug

Just a simple rspell --help takes 25 seconds to respond, and I have no idea why. Any help on this would be appreciated.

Steps To Reproduce

rspell --help and time it :)

Screenshots

No response

Additional context

No response

Lioness100 avatar Feb 06 '23 22:02 Lioness100

ok, I will be looking into this

ankits57 avatar Feb 07 '23 06:02 ankits57

Thanks so so much!!!

Lioness100 avatar Feb 07 '23 12:02 Lioness100

The above commit didn't fix it, just made it a bit faster. All of the time loss is from requiring packages (you can use time-require for local testing). It looks like this isn't a problem when compiling to esm. The only reason I compiled to cjs is because pkg, used to compile the output into an executable file, can only handle cjs. So, we could have the files published to npm be esm, and the files used in the github action with pkg to be cjs, but then the executable files would suffer the same issue.

Lioness100 avatar Feb 09 '23 22:02 Lioness100

There's also the option of just stopping support for the precompiled binaries, they're really big anyways and were only supported as a little experiment. Not sure though, they may have some merit.

Lioness100 avatar Feb 17 '23 02:02 Lioness100