perf(install): request abbreviated packuments from npm registry#32364
Merged
nathanwhit merged 3 commits intodenoland:mainfrom Mar 2, 2026
Merged
perf(install): request abbreviated packuments from npm registry#32364nathanwhit merged 3 commits intodenoland:mainfrom
nathanwhit merged 3 commits intodenoland:mainfrom
Conversation
Request the abbreviated install manifest format (application/vnd.npm.install-v1+json) which is 2-5x smaller than the full packument. Add has_install_script field to NpmPackageVersionInfo to support the hasInstallScript field from the abbreviated format.
Member
|
Closes #16177? |
4ec3a0b to
1849eed
Compare
Member
Might still be useful to slim down the larger cache, but probably not worth the complexity or time it takes to do so. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here's the speedup with a clean cache against an astro starter repo
Any package that has a large packument should see a noticeable speedup, since the abbreviated versions tend to be 2-5x smaller.
One complication is that the time field is not present in abbreviated metadata, so if you are using the minimum-dependency-age resolution option, then we have to request the full metadata. Then that full metadata gets written to the fs cache. So basically if you're using minimum-dependency-age you won't see a benefit, which is unfortunate but no good way around it at this point.
Disclosure: the idea and direction came from me, claude did the code changes, but i've reviewed every line in the PR