-
-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finding engine
is pretty slow
#807
Comments
From some experimentation, the slowest part is using Relatively slow with complex expression: % time n lsr engine
found : /Users/john/Documents/Sandpits/n/issues/807/package.json
read : >=14.6 <19.0.0
resolving : >=14.6 <19.0.0
18.20.4
n lsr engine 1.47s user 0.38s system 86% cpu 2.149 total Relatively fast with simple expression that is recognised by % time n lsr engine
found : /Users/john/Documents/Sandpits/n/issues/807/package.json
read : >18.0.0
target : current
22.5.1
n lsr engine 0.06s user 0.04s system 75% cpu 0.141 total The block of code that contains that progress uses |
I'm talking about the simple case, where just starting For example, |
For interest, what are you doing that you notice the slowness? |
On the one hand, I don't particularly like checking for an optional tool. On the other hand, the PR welcome, see how it goes. (And I would like |
|
@shadowspawn Made the above PR. Apologies, but I can't access my work machine at the moment, so I used the tweak that I did previously, with a bit of reshuffling to make it a proper PR. Hopefully I didn't make have any stupid typos. |
Released in v10.0.0 |
Thanks! |
Since it uses
node
to find the version, and starting it is kind of slow.If it's ok to use
jq
, I'll be happy to make a PR that uses it if it exists, or usenode
otherwise.The text was updated successfully, but these errors were encountered: