Skip to content
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

[BUG] Slow down on npm installs when using custom registry compared to < v10 #7333

Open
2 tasks done
rriskus-r7 opened this issue Apr 3, 2024 · 1 comment
Open
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x

Comments

@rriskus-r7
Copy link

rriskus-r7 commented Apr 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

When using npm version 10+ with artifactory as the npm registry it takes over 6m for npm installs compared to v9 which is usually half the time

Machine M1 Macbook but the same slowness was observe in our builds when using 10
Cleared node_modules and cache for each test rm -rf node_modules && npm cache clean --force && time npm i

Is anyone able to advise if something changed in terms of npm 10 in regards to resource management? I found it strange that time command for npm was similar but the overall time increased if anyone knows why.

Ran 2 of our local repos with the same outcome

node npm private repo 1 private repo 2
20.11.1 10.5.0 npm i 96.14s user 31.78s system 33% cpu 6:24.16 total npm i 80.79s user 21.22s system 25% cpu 6:37.86 total
20.11.1 9.9.3 npm i 93.55s user 32.85s system 76% cpu 2:44.17 total npm i 71.34s user 21.57s system 84% cpu 1:49.86 total
20.11.1 8.19.4 npm i 83.29s user 29.63s system 96% cpu 1:57.12 total npm i 71.39s user 21.74s system 90% cpu 1:43.40 total

I also ran sentry repo which identifies the issue being artifactory linked but can also see slower install times in v10

node npm https://github.com/getsentry/sentry https://github.com/getsentry/sentry with artifactory
20.11.1 10.5.0 npm i 48.17s user 20.65s system 43% cpu 2:39.36 total npm i 65.16s user 21.31s system 17% cpu 8:06.44 total
20.11.1 9.9.3 npm i 26.51s user 17.14s system 54% cpu 1:20.72 total  
20.11.1 8.19.4 npm i 25.24s user 18.17s system 68% cpu 1:03.04 total npm i 35.73s user 19.91s system 24% cpu 3:49.53 total

I may be wrong and it might just be an issue with artifactory but it seems like this only happens on version 10 which I found strange.

Expected Behavior

Expected to see similar times as previous version of npm

Steps To Reproduce

Not sure if this can be reproduced any other way than having self hosted artifactory, I have not tested with any other registry as I don't have one at hand.

Environment

  • npm: 10.5.0
  • Node.js: 20.11.1
  • OS Name: Mac OS
  • System Model Name: M1 Macbook
  • npm config:
registry=(link to artifactory)
--no-shrinkwrap
commit-hooks=false
save-exact=true
legacy-peer-deps
@rriskus-r7 rriskus-r7 added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Apr 3, 2024
@rriskus-r7 rriskus-r7 changed the title [BUG] Slow down on npm installs when using custom registry compared to v9 [BUG] Slow down on npm installs when using custom registry compared to <10 Apr 3, 2024
@rriskus-r7 rriskus-r7 changed the title [BUG] Slow down on npm installs when using custom registry compared to <10 [BUG] Slow down on npm installs when using custom registry compared to < v10 Apr 3, 2024
@rriskus-r7
Copy link
Author

We are still seeing the issue is there anyone able to provide some info as to why this is happening. We are blocked from upgrading existing projects to use 10+ npm version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x
Projects
None yet
Development

No branches or pull requests

1 participant