[BUG] In v9, installing from packages directly from Github via SSH is so much slower than before
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
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
After upgrading to NPM 9.8.1, installing a package from the NPM registry seems faster, but installing it from Github via SSH is way slower. For a single package, it went from 80s to 3 minutes. I've outlined the results of installing a single package (ember-changeset) both from the NPM registry and from Github, and in each case given the results for NPM 9.8.1 and 6.14.18.
The pattern is consistent. Since upgrading to npm 9, bigger applications that have multiple Github-hosted packages have gone from taking close to 6 minutes for an install to about 26 minutes.
Is there anything that I can do to improve this?
From the NPM registry
"devDependencies": {
"ember-changeset": "4.1.2"
}
(NPM 6.14.18, Node 14.21.3) => added 704 packages from 333 contributors and audited 704 packages in 28.717s
(NPM 9.8.1, Node 18.18.0) => added 566 packages, and audited 777 packages in 8s
Directly from Github via SSH
"devDependencies": {
"ember-changeset": "git+ssh://git@github.com:poteto/ember-changeset.git#4528b9ce580e85fdb3d032b52546be73d184b73c"
}
(NPM 6.14.18, Node 14.21.3) => added 704 packages from 333 contributors and audited 704 packages in 79.362s
(NPM 9.8.1, Node 18.18.0) => added 566 packages, and audited 777 packages in 3m
Environment
- npm: 9.8.1
- Node.js: 18.18.0
- OS Name: Ubuntu 22
- System Model Name: MSI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the pinned GitHub SSH dependency install with npm 9.8.1 and compare it with npm 6.14.18 using the versions and environment provided; done means the slowdown is explained and a regression fix is covered by verification of the reported timing path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100