Skip to content

resolution is significantly slower against azure artifacts than against the npm public registry #13976

Description

@astegmaier

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

Dependencies resolver

Link to the code that reproduces this issue or a replay of the bug

https://github.com/astegmaier/playground-pnpm-ado-benchmarks/

Reproduction steps

Start with the alotta-modules benchmark package.json,

Run pnpm dedupe --lockfile-only to populate your metadata cache.

Then run pnpm dedupe --lockfile-only again (with a warm cache), with with different settings in your .npmrc:

# This is fast
# registry=https://registry.npmjs.org/

# This is slow
registry=https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/

Describe the Bug

The difference between Azure Artifacts feeds and the public npm feed boils down to three things:

  1. No etag support in ADO
  2. ADO ignores abbreviated packument requests
  3. ADO is appears to be somewhat slower in general, even for same-sized requests

All three of these differences could be considered upstream bugs, and I'm working with the Azure Artifacts team to try to resolve them there.

I'm filing this issue because I think pnpm is ALSO being a bit less efficient than it could be, and it would be rightous to improve this on the pnpm side - it might affect kinds of non-npm feeds that suffer from the same feature gaps.

Specifically, pnpm seems to be quite liberal with sending off conditional metadata requests to the feed. In the npm case (with etag support) this is quite fast, so it's likely that nobody has noticed. But with a feed like Azure Artifacts (without etag support), it becomes a major bottleneck.

Expected Behavior

pnpm should be faster :-)

Which Node.js version are you using?

24.16.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions