Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    npm install slow on proxy feed

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 26 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      andreas.unverdorben_1551
      last edited by

      Hi,

      we're currently running ProGet Version 2023.27 (Build 5). We have a npm feed configured as a proxy feed for https://registry.npmjs.org.

      We've noticed that npm install is significantly slower when using our proxy feed (compared to directly installing from npmjs.org) even when all requested packages are cached on the ProGet server.

      Our test scenario ist this:

      • empty npm cache

      • delete node_modues directory

      • delete package-lock.json file

      • run npm install

      Results:
      ProGet: 02m35s
      npmjs.org: 00m38s

      = ~4x slower with ProGet

      Is anyone else experiencing the same behavior? Any tips how to speed things up with ProGet?`

      Thanks in advance!
      Andreas

      dean-houstonD 1 Reply Last reply Reply Quote 0
      • dean-houstonD Offline
        dean-houston inedo-engineer @andreas.unverdorben_1551
        last edited by

        Hi @andreas-unverdorben_1551 ,

        npmjs.org primarily serves static content and runs on massive server farms running in Microsoft's datacenters.

        Your ProGet server is much less powerful and does not serve static content. Not only is every request is dynamic (authentication, authorization, vulnerability checking, license checking, etc), but most requests (such as "what is the latest version of package X") need to be forwarded to npmjs.org and aggregated with local data.

        So, a much less powerful server doing a lot more processing is going to be a little slower ;)

        Running ProGet in a server cluster will certainly help.

        Cheers,
        Dean

        1 Reply Last reply Reply Quote 1
        • A Offline
          andreas.unverdorben_1551
          last edited by

          Hi Dean,

          we noticed that when performing an "npm install" against ProGet it will successively open ~1000 sessions.

          We tried a couple of values for Web.ConcurrentRequestLimit under "Administration --> Advanced Setting" (20, 50, 100, 200) and found out, that when using 100 we get the same (or even better) performance for an "npm install" compared to registry.npmjs.org. We're not exactly sure how Web.ConcurrentRequestLimit works but we assume that it has some relation to the default pool size for the SQL Server connection used by ProGet, which also seems to be 100.

          I just wanted to let you know, that by setting Web.ConcurrentRequestLimit to 100 the performance of "npm install" is back to normal.

          Best,
          Andreas

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation