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] npm ls is still slow #7820

Open
2 tasks done
Rudxain opened this issue Oct 6, 2024 · 3 comments
Open
2 tasks done

[BUG] npm ls is still slow #7820

Rudxain opened this issue Oct 6, 2024 · 3 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@Rudxain
Copy link

Rudxain commented Oct 6, 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

npm/npm#6507

  • On an Dell Inspiron 15R, with its HDD replaced by an SSD, running Debian 13 (Node LTS), it takes ~1.2s
  • On a Samsung Galaxy A31, from Termux repos (Node latest), it takes ~3s

It's slow, both with and without -g flag. Even on directories that contain no package.json

Expected Behavior

It should be sub ~500ms

Steps To Reproduce

  1. On Debian or Termux
  2. Run time npm list (-g optional)
  3. See timings

Environment

  • npm: 10.9.0
  • Node.js: v20.17.0
  • OS Name: Debian 13 "Trixie"
  • System Model Name: Inspiron 5521
  • npm config:
; copy and paste output from `npm config ls` here
; TO-DO
@Rudxain Rudxain added Bug thing that needs fixing Needs Triage needs review for next steps labels Oct 6, 2024
@OS-Scratch
Copy link

I'm using npm 11.0.0 and it works fine for me (output: html-css@0.2.0 D:\Websites\HTML-CSS-OLD -- http-server@14.1.1). The results come in in about 3 secs.

@Rudxain
Copy link
Author

Rudxain commented Dec 29, 2024

TCL 505, Node 23.5.0, :

~ > time npm ls
/data/data/com.termux/files/home
└── (empty)


real    0m4.970s
user    0m4.736s
sys     0m0.975s
~ > time npm ls -g
/data/data/com.termux/files/usr/lib
├── bash-language-server@5.4.2
├── corepack@0.30.0
├── npm@11.0.0
├── typescript-language-server@4.3.3
└── typescript@5.7.2


real    0m6.980s
user    0m7.297s
sys     0m1.265s
~ > time node --eval '' # for reference

real    0m0.730s
user    0m0.594s
sys     0m0.124s

@Rudxain Rudxain changed the title [BUG] npm list is still slow [BUG] npm ls is still slow Dec 29, 2024
@OS-Scratch
Copy link

You have the early-release version, as I can tell. Try the 22.x (LTS) one, it should work there.

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
Projects
None yet
Development

No branches or pull requests

2 participants