Skip to content

perf(install): avoid unnecessary package info fetches when running lifecycle scripts#32653

Merged
nathanwhit merged 1 commit intodenoland:mainfrom
nathanwhit:fix-extra-fetches
Mar 12, 2026
Merged

perf(install): avoid unnecessary package info fetches when running lifecycle scripts#32653
nathanwhit merged 1 commit intodenoland:mainfrom
nathanwhit:fix-extra-fetches

Conversation

@nathanwhit
Copy link
Copy Markdown
Member

This was happening at the end of the install pipeline, and for some packages lead to a bunch of extra package info fetches. Speeds up installs a lot when you have only a lockfile

astro starter,

> hyperfine --warmup 1 --prepare "deno clean; rm -rf node_modules" "deno install --allow-scripts" "~/Documents/Code/deno/target/release-lite/deno install --allow-scripts"
Benchmark 1: deno install --allow-scripts
  Time (mean ± σ):      5.062 s ±  0.321 s    [User: 0.807 s, System: 2.596 s]
  Range (min … max):    4.505 s …  5.555 s    10 runs

Benchmark 2: ~/Documents/Code/deno/target/release-lite/deno install --allow-scripts
  Time (mean ± σ):      2.355 s ±  0.442 s    [User: 0.687 s, System: 2.668 s]
  Range (min … max):    2.028 s …  3.586 s    10 runs

@nathanwhit nathanwhit requested a review from dsherret March 12, 2026 00:03
@nathanwhit nathanwhit changed the title perf(install): avoid unnecessary fetches of package info on other systems perf(install): avoid unnecessary fetches of info for packages that don't match the system Mar 12, 2026
Copy link
Copy Markdown
Contributor

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@nathanwhit nathanwhit changed the title perf(install): avoid unnecessary fetches of info for packages that don't match the system perf(install): avoid unnecessary package info fetches when running lifecycle scripts Mar 12, 2026
@nathanwhit nathanwhit enabled auto-merge (squash) March 12, 2026 00:17
@nathanwhit nathanwhit merged commit c1797ae into denoland:main Mar 12, 2026
222 of 224 checks passed
@nathanwhit nathanwhit deleted the fix-extra-fetches branch March 12, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants