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

deno install (deno_npm::resolution) is very slow when creating lock file #28517

Closed
ansemb opened this issue Mar 16, 2025 · 3 comments · Fixed by #28636
Closed

deno install (deno_npm::resolution) is very slow when creating lock file #28517

ansemb opened this issue Mar 16, 2025 · 3 comments · Fixed by #28636
Assignees
Labels

Comments

@ansemb
Copy link

ansemb commented Mar 16, 2025

Hi,

When using deno install to create (or update) the deno.lock, the deno_npm::resolution step is really slow (e.g. compared to pnpm) for resolving peer dependencies.

Note: I'm on a Mac M1 (Apple M1 Max, 64GB)

I'm trying to add deno into a monorepo at Microsoft with ~3000 packages, but I'm unable to create the deno.lock file, due to the resolution being too slow. I've kept the deno install running continuously for >24 hours without luck.

Smaller repro

I've added a small repository for reproduction.

I'm doing deno install and pnpm install without a lock file.

Note: this is a random sample from a couple of runs so there will be some variance

❯ time deno install
//...
________________________________________________________
Executed in  352.56 secs    fish           external
   usr time  607.77 secs    0.08 millis  607.77 secs
   sys time  104.72 secs    2.81 millis  104.72 secs
❯ time pnpm install
//...
________________________________________________________
Executed in   23.16 secs    fish           external
   usr time   12.26 secs    0.09 millis   12.26 secs
   sys time   78.50 secs    3.33 millis   78.49 secs

logs

Adding a sample of the debug for deno install. It keeps going graph resolution for the majority of the time.

deno -L trace install:

DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for @babel/core in @babel/[email protected]_@[email protected] to @babel/[email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for browserslist in [email protected][email protected] to [email protected]
DEBUG RS - deno_npm::resolution::graph:1395 - Resolved peer dependency for @babel/core in @babel/[email protected]_@[email protected] to @babel/[email protected]

❯ deno --version
deno 2.2.4 (stable, release, aarch64-apple-darwin)
v8 13.4.114.11-rusty
typescript 5.7.3

@JOTSR
Copy link
Contributor

JOTSR commented Mar 20, 2025

Same issue on windows 11.

Always stuck at DEBUG RS - deno_npm::resolution::graph:932 - [email protected] - Resolved safe-buffer@~5.1.0 to [email protected] and consuming ~250MB/s (hard kill at ~20GB/32GB in 1min) with "@stdlib/stats".

Direct npm import (no install) doesn't work either.

Regression to any deno 2.x don't solve this.

@ry
Copy link
Member

ry commented Mar 24, 2025

This is still an issue (unfortunately) after #28586 landed

@nathanwhit
Copy link
Member

This is actually not related to peer dependencies. This is a pathological case in the way we do caching of npm package info. Will open PR with a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants