Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

npm ci; 45 seconds elapses between arborist:ctor and idealTree:init #207

@rickhull

Description

@rickhull

What / Why

npm ci is taking about 5 minutes to complete, and I am investigating. I am redirecting npm's output to a log file, and in another session, I am writing a timestamp to the same file every 5 seconds. (For the record, npm's timing output is less than helpful in diagnosing where slowdowns are occurring).

After npm timing arborist:ctor Completed in 0ms, I am seeing around 45 seconds of elapsed wall clock time with no output, and then npm timing idealTree:init Completed in 1ms

When

On npm ci --offline --loglevel verbose --progress false

Where

npm ci on macOS 11.1 (Big Sur) on 2017 MBP (quad 3.1 GHz i7)

npm info using [email protected]
npm info using [email protected]

How

Current Behavior

Mon Jan 25 15:21:52 EST 2021
npm verb cli [
npm verb cli   '/usr/local/Cellar/node/15.5.1/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'ci',
npm verb cli   '--offline',
npm verb cli   '--loglevel',
npm verb cli   'verbose',
npm verb cli   '--progress',
npm verb cli   'false'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
npm timing config:load:builtin Completed in 2ms
npm timing config:load:cli Completed in 1ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:/Users/rhull/axio/client/.npmrc Completed in 1ms
npm timing config:load:project Completed in 1ms
npm timing config:load:file:/Users/rhull/.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:/usr/local/etc/npmrc Completed in 3ms
npm timing config:load:global Completed in 3ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:setUserAgent Completed in 1ms
npm timing config:load:setEnvs Completed in 0ms
npm timing config:load Completed in 10ms
npm verb npm-session e4bdf1c0f8ab853c
npm timing npm:load Completed in 20ms
npm timing arborist:ctor Completed in 0ms
Mon Jan 25 15:21:57 EST 2021
Mon Jan 25 15:22:02 EST 2021
Mon Jan 25 15:22:07 EST 2021
Mon Jan 25 15:22:12 EST 2021
Mon Jan 25 15:22:17 EST 2021
Mon Jan 25 15:22:22 EST 2021
Mon Jan 25 15:22:27 EST 2021
Mon Jan 25 15:22:32 EST 2021
Mon Jan 25 15:22:37 EST 2021
npm timing idealTree:init Completed in 1ms
npm timing idealTree:userRequests Completed in 0ms
npm timing idealTree:#root Completed in 1ms
npm timing idealTree:buildDeps Completed in 1ms
npm timing idealTree:fixDepFlags Completed in 1ms
npm timing idealTree Completed in 8ms
npm timing reify:loadTrees Completed in 152ms
npm timing reify:diffTrees Completed in 54ms
npm timing reify:retireShallow Completed in 0ms
npm timing reify:createSparse Completed in 548ms
npm timing reifyNode:node_modules/npm Completed in 1183ms
npm timing arborist:ctor Completed in 0ms
npm timing reify:diffTrees Completed in 55ms
npm timing reify:loadBundles Completed in 1489ms
Mon Jan 25 15:22:42 EST 2021
Mon Jan 25 15:22:47 EST 2021
Mon Jan 25 15:22:52 EST 2021
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 13457ms

More context is above. Here is a focus on the area of concern:

npm timing arborist:ctor Completed in 0ms
Mon Jan 25 15:21:57 EST 2021
Mon Jan 25 15:22:02 EST 2021
Mon Jan 25 15:22:07 EST 2021
Mon Jan 25 15:22:12 EST 2021
Mon Jan 25 15:22:17 EST 2021
Mon Jan 25 15:22:22 EST 2021
Mon Jan 25 15:22:27 EST 2021
Mon Jan 25 15:22:32 EST 2021
Mon Jan 25 15:22:37 EST 2021
npm timing idealTree:init Completed in 1ms

Steps to Reproduce

Run npm ci --offline --loglevel verbose --progress false with my package-lock.json; inject timestamps every 5 seconds with another process.

Expected Behavior

45 seconds should not elapse between 2 output lines that show 1 ms elapsed. It would be nice to have more output for something that is taking so long. Whatever is happening during this 45 seconds -- is it expected behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions