pnpm / pnpm/benchmarks

Add time taken to add a new module (eg. npm install XXX)

Open
#29 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
433
Forks
28
Avg merge
48m
Merged PRs (30d)
6

Description

It would be nice if the benchmark also tracked how long it took to install (ie. add) modules, after the project has already been fully installed/initialized.

This is an important consideration, since it's the most common dependency-related operation that is performed (at least in my projects).

It's also significant because npm is actually faster than yarn for adding new modules -- at least for my project, with a package-lock present for both:

These commands were done in order, in the "mobx-devtools-advanced" repo, on 2019-11-13.

NPM version: 6.11.2
Yarn version: 1.19.1

* npm install lodash@1.2.0: 62s (slow since had to clear yarn metadata + rebuild it)
* npm install lodash@1.2.1: 5s
* npm install lodash@1.3.0: 5s
* npm install lodash@1.3.1: 5s
* yarn add lodash@2.0.0: 48s (slow since had to clear npm metadata + rebuild it)
* yarn add lodash@2.1.0: 12s
* yarn add lodash@2.2.0: 10s
* npm install lodash @2.0.0: 67s (slow again due to rebuild)
* npm install lodash @2.1.0: 5s
* npm install lodash @2.2.0: 5s

Note that the operation of just adding a new module took about half as long for npm than yarn.

That said, both are quite fast, so perhaps it's not so important after all.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the benchmark scenarios and existing npm, Yarn, and pnpm command definitions in the repository. Compare how dependency installation is currently measured, then add a separately reported timing for adding a module after initialization; completion should include benchmark results for that operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.