Skip to content

[BUG] serious npm ci performance regression in 7.21.0 #3676

@sarahkadar

Description

@sarahkadar

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

time npm ci --no-audit --prefer-offline

[email protected]:

added 3593 packages in 24s

________________________________________________________
Executed in   24.62 secs    fish           external
   usr time   26.91 secs  238.00 micros   26.91 secs
   sys time   23.69 secs  871.00 micros   23.69 secs

[email protected]:

added 3593 packages in 37s

________________________________________________________
Executed in   37.41 secs    fish           external
   usr time   39.74 secs  264.00 micros   39.74 secs
   sys time   24.86 secs  933.00 micros   24.86 secs

i did an rm -rf node_modules && rm -rf workspaces/test/node_modules by hand each time and the cache is completely warm.

i tested this on my laptop (2019 16" MBP, Core i9, 64 GB RAM, internal SSD) but i see this slowdown in our CI as well (GitLab CI, custom GitLab runners on AWS, c5d.xlarge instances using docker machine)

Expected Behavior

[email protected] not be 50% slower

Steps To Reproduce

  1. clone https://github.com/KTamas/npm7210-perf-regression
  2. run npm ci --no-audit --prefer-offline (twice so the cache is warm)

Environment

  • OS: MacOS 11.5.2
  • Node: 16.7.0
  • npm: 7.20.6 and 7.21.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions