4 ms·
node has a costly and intertwined init itself, where the startup cost is 50-100ms. On top of that, `npm` similarly has a high startup cost adding to the origin
by spion 5y ago
node has a costly and intertwined init itself, where the startup cost is 50-100ms.
On top of that, `npm` similarly has a high startup cost adding to the original node cost.
Node apps are very slow to start to run due to synchronous `require` eager-loading all the module files, so there is some re-architecting necessary to get a performant startup time
yarn v1 is probably the best of the bunch with startup lag close to pure node (100-150ms)
yarn v2 and up can be extremely bad, 1s-3s with medium to large repos, especially with PnP enabled which AFAIK forces eager resolution.
pnpm similarly has had troubles starting up quickly. It used to be even slower as it passed the command to `npm` in a suboptimal way. Nowadays its about the same speed as `npm` as it uses `npm` for `run`.