Skip to content

perf(install): parallel importer manifest transforms and one-pass link rendering - #14523

Merged
zkochan merged 2 commits into
mainfrom
perf/next-walk
Sep 4, 2026
Merged

zkochan merged 2 commits into
mainfrom
perf/next-walk

Conversation

@zkochan

@zkochan zkochan commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Related to pnpm/pnpm#14352 (continuing the large-workspace performance effort).

Re-profiling the warm lockfile-only update on the 6,833-project repro (current main, ~1.07 s median locally) surfaced two per-importer costs still paid serially:

  1. build_manifest_transforms transformed every importer manifest on the main thread. The compatibility-DB package extender is active by default, so a workspace-scale install always clones and rewrites all 6,833 importer manifests in a serial loop before resolution starts. Each importer's transform is independent, so the loop now fans out across rayon; the rebuilt BTreeMap restores ordering regardless of completion order. Profile: 16 → 2 samples.

  2. ImporterAnchor::target_relative_to_importer split the target string twice per edge — once to find the shared prefix with the importer suffix, and again to render the kept tail (str::split was the single largest self-time entry in the profile). One pass over the target's bytes now classifies raw segments, grows the shared prefix, and remembers where the kept tail starts; when the tail is verbatim (no collapsed separators, . segments, or trailing separator — the overwhelmingly common case) the rendering is a single String build from the climb count and the raw tail slice. A non-verbatim tail falls back to the segment join. New unit tests pin that messy spellings (packages//lib, packages/./lib, packages/lib/, ./packages/lib) render identically to their clean form, alongside the existing diff_paths parity test. Profile: peers pass 56 → 42 samples inclusive.

Benchmark (protocol from the prior PRs in this effort: restore package.json + pnpm-lock.yaml, flip one root dep workspace:* → workspace:^, pnpm install --lockfile-only --trust-lockfile --offline --ignore-scripts, medians of 10 runs):

median min
main 1067 ms 1035 ms
this PR 969 ms 941 ms

The produced lockfile is byte-identical: diffing against the committed lockfile shows exactly the one flipped specifier line.

This is pacquet-internal performance work with no user-visible behavior change, so no TypeScript-side change is needed.

Squash Commit Body

Two costs the warm lockfile-only update profile on the 6,833-project
workspace repro still charged per importer:

- build_manifest_transforms cloned and transformed every importer
  manifest serially; the compatibility-DB extender is active by
  default, so a workspace-scale install always paid the whole loop on
  the main thread. Each importer's transform is independent, so the
  loop now fans out across rayon and the rebuilt BTreeMap restores the
  ordering (16 -> 2 profile samples).

- ImporterAnchor::target_relative_to_importer split the target string
  twice per edge: once to find the shared prefix, and again to render
  the kept tail. One pass over the target's bytes now classifies the
  raw segments, grows the shared prefix, and remembers where the kept
  tail starts; when the tail is verbatim (no collapsed separators, dot
  segments, or trailing separator - the overwhelmingly common case)
  the rendering is a single String build from the climb and the raw
  tail slice. A non-verbatim tail falls back to the segment join, with
  new unit tests pinning that both spellings render identically.

Warm lockfile-only update on the repro: median 1067 ms -> 969 ms, with
the produced lockfile byte-identical (only the flipped specifier
changes). Part of the pnpm/pnpm#14352 performance effort.

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
    (pacquet-internal performance work; no behavior change to mirror.)
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Claude Code, claude-fable-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Performance

    • Dependency resolution now prepares project manifests in parallel, improving installation efficiency while preserving deterministic results.
  • Bug Fixes

    • Workspace link paths are rendered more reliably, including paths with repeated separators, relative segments, trailing separators, and platform-specific formats.
    • Invalid anchored or drive-prefixed paths are handled safely.
  • Tests

    • Added coverage for normalized workspace link rendering and edge cases involving equivalent or parent paths.

…k rendering

Two costs the warm lockfile-only update profile on the 6,833-project
workspace repro still charged per importer:

- build_manifest_transforms cloned and transformed every importer
  manifest serially; the compatibility-DB extender is active by
  default, so a workspace-scale install always paid the whole loop on
  the main thread. Each importer's transform is independent, so the
  loop now fans out across rayon and the rebuilt BTreeMap restores the
  ordering (16 -> 2 profile samples).

- ImporterAnchor::target_relative_to_importer split the target string
  twice per edge: once to find the shared prefix, and again to render
  the kept tail. One pass over the target's bytes now classifies the
  raw segments, grows the shared prefix, and remembers where the kept
  tail starts; when the tail is verbatim (no collapsed separators, dot
  segments, or trailing separator - the overwhelmingly common case)
  the rendering is a single String build from the climb and the raw
  tail slice. A non-verbatim tail falls back to the segment join, with
  new unit tests pinning that both spellings render identically.

Warm lockfile-only update on the repro: median 1067 ms -> 969 ms, with
the produced lockfile byte-identical (only the flipped specifier
changes). Part of the #14352 performance effort.
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Parallelize manifest transforms and streamline link rendering

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Parallelizes independent importer manifest transforms while preserving deterministic BTreeMap
 ordering.
• Renders common workspace link targets in one pass, retaining normalization fallbacks.
• Adds regression coverage and release notes for large-workspace installation gains.
Diagram

graph TD
  A["Install Request"] --> B{"Transforms Active"} -->|Yes| C["Rayon Transforms"] --> D["Dependency Resolver"] --> E{"Tail Verbatim"} -->|Yes| F["Direct Render"] --> H["Lockfile Output"]
  B -->|No| D
  E -->|No| G["Segment Join"] --> H
Loading
High-Level Assessment

The proposed approach is appropriate: importer transforms are independent and therefore fit Rayon parallelism, while collecting into a BTreeMap preserves deterministic ordering. The link renderer optimizes the overwhelmingly common clean-path case without removing the established normalization fallback. Threshold-based parallelization or caching transformed manifests would add lifecycle and invalidation complexity without evidence of a better tradeoff.

Files changed (4) +121 / -28

Enhancement (1) +25 / -17
manifest_transforms.rsTransform importer manifests concurrently with Rayon +25/-17

Transform importer manifests concurrently with Rayon

• Replaces serial importer manifest transformation with a parallel iterator. Results are collected into a 'BTreeMap', retaining deterministic importer ordering while applying compatibility extensions, user extensions, deploy hooks, and overrides independently.

pnpm/crates/package-manager/src/install_with_fresh_lockfile/manifest_transforms.rs

Tests (1) +25 / -0
tests.rsCover normalized and boundary link-target renderings +25/-0

Cover normalized and boundary link-target renderings

• Verifies repeated separators, dot segments, trailing separators, and leading dot segments match clean path rendering. Also covers targets equal to the importer and targets that are importer prefixes.

pnpm/crates/resolving-deps-resolver/src/link_target/tests.rs

Documentation (1) +5 / -0
parallel-manifest-transforms.mdDocument large-workspace resolution performance improvements +5/-0

Document large-workspace resolution performance improvements

• Adds a patch changeset for 'pacquet' describing parallel manifest preparation and single-pass workspace link rendering.

.changeset/parallel-manifest-transforms.md

Other (1) +66 / -11
link_target.rsRender importer-relative link targets in one pass +66/-11

Render importer-relative link targets in one pass

• Scans target segments once to calculate the shared prefix and locate a verbatim tail, then renders common paths directly into one string. Anchored, escaping, Windows-prefixed, and non-verbatim targets retain validation or normalized fallback behavior.

pnpm/crates/resolving-deps-resolver/src/link_target.rs

@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 6e9d2ce0-bcdc-424b-849d-b6614079c735

📥 Commits

Reviewing files that changed from the base of the PR and between 1a6f57d and 16668fc.

📒 Files selected for processing (2)
  • .changeset/parallel-manifest-transforms.md
  • pnpm/crates/resolving-deps-resolver/src/link_target.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • pnpm/crates/resolving-deps-resolver/src/link_target.rs
  • .changeset/parallel-manifest-transforms.md

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The package manager now transforms importer manifests in parallel. The dependency resolver uses single-pass relative link rendering with fast-path output and fallback normalization. Tests cover normalized targets, identical paths, and importer-prefix paths.

Changes

Manifest and link performance

Layer / File(s) Summary
Parallel importer manifest preparation
pnpm/crates/package-manager/src/install_with_fresh_lockfile/manifest_transforms.rs, .changeset/parallel-manifest-transforms.md
Importer transformations run in parallel and are collected into a BTreeMap. The changeset documents faster dependency resolution.
Single-pass relative link rendering
pnpm/crates/resolving-deps-resolver/src/link_target.rs, pnpm/crates/resolving-deps-resolver/src/link_target/tests.rs
target_relative_to_importer classifies raw segments in one pass, uses direct rendering for verbatim tails, and falls back for normalized tails. Tests cover collapsed separators, dot segments, trailing separators, identical paths, and prefix paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 16668

This change improves install performance while preserving deterministic manifest ordering and adds link-target boundary coverage. No current merge-blocking risk remains.

Suggested labels: product: pacquet

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/next-walk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

qodo-code-review Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. pnpm missing from changeset 📘 Rule violation § Compliance
Description
The changeset declares only pacquet, but every changeset must explicitly include pnpm with an
appropriate bump type. Because this is described as internal-only work, removing the unnecessary
changeset is also a valid resolution.
Code

.changeset/parallel-manifest-transforms.md[2]

+"pacquet": patch
Evidence
Rule 713436 requires an explicit pnpm entry in every changeset, while the new front matter
contains only "pacquet": patch.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/parallel-manifest-transforms.md[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset omits the required explicit `pnpm` package entry.

## Issue Context
Compliance rule 713436 requires every changeset to declare `pnpm` with a valid bump type. Since the PR describes this as an internal performance change without user-visible behavior, consider removing the changeset; otherwise add `"pnpm": patch`.

## Fix Focus Areas
- .changeset/parallel-manifest-transforms.md[1-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Changeset combines two changes ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The second sentence combines parallel manifest preparation and single-pass workspace-link rendering
as two separate changes. Each changeset sentence must describe only one logical change.
Code

.changeset/parallel-manifest-transforms.md[5]

+Sped up dependency resolution in large workspaces. pnpm now prepares project manifests for resolution in parallel and renders workspace link paths in a single pass [#14352](https://github.com/pnpm/pnpm/issues/14352).
Relevance

● Weak

A same-day performance changeset combining two optimizations had the compound-sentence finding
rejected.

PR-#14498

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 3058304 requires each sentence to contain one logical change, while line 5 describes both
parallel manifest preparation and single-pass workspace-link path rendering.

Rule 3058304: Avoid compound sentences in individual changeset entries
.changeset/parallel-manifest-transforms.md[5-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A single changeset sentence combines two distinct implementation changes with `and`.

## Issue Context
Remove the internal details entirely if the entry is retained, or split distinct observable outcomes into separate sentences where each sentence communicates one logical change.

## Fix Focus Areas
- .changeset/parallel-manifest-transforms.md[5-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Changeset exposes implementation details ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The release note describes parallel manifest preparation and single-pass path rendering, which are
internal implementation mechanisms rather than observable behavior. Changeset text must state only
the concrete user-visible performance outcome.
Code

.changeset/parallel-manifest-transforms.md[5]

+Sped up dependency resolution in large workspaces. pnpm now prepares project manifests for resolution in parallel and renders workspace link paths in a single pass [#14352](https://github.com/pnpm/pnpm/issues/14352).
Relevance

● Weak

A same-day performance changeset with internal allocation details had this observability finding
rejected.

PR-#14509

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 3058322 limits changeset entries to observable behavior, but the second sentence explains how
manifests and workspace link paths are processed internally.

Rule 3058322: Changeset entries must describe observable behavior changes only
.changeset/parallel-manifest-transforms.md[5-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset entry exposes internal implementation mechanisms instead of limiting its text to observable behavior.

## Issue Context
Keep only a concrete, user-visible performance statement, preferably naming the affected command and measured outcome. Remove references to parallel manifest transforms and single-pass workspace-link rendering.

## Fix Focus Areas
- .changeset/parallel-manifest-transforms.md[5-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 33 rules
Review mode: ⚖️ Balanced

Grey Divider

Tip of the day
💡 Did you know, you can route each action level your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@greptile-apps

greptile-apps Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "docs: trim the changeset and the scanner..." | Re-trigger Greptile

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.04     13.7±0.28ms    27.3 MB/sec    1.00     13.2±0.16ms    28.5 MB/sec
packument/parse                                  1.02     44.2±0.25µs  1500.7 MB/sec    1.00     43.5±0.60µs  1523.6 MB/sec
tarball/download_dependency                      1.00      4.5±0.23ms   955.4 KB/sec    1.01      4.6±0.39ms   949.8 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.01    231.6±4.79ms 69.1 KElem/sec    1.00    228.9±5.46ms 69.9 KElem/sec
workspace_resolution/hoist_heavy                 1.06    281.7±4.70ms        ? ?/sec    1.00    265.9±3.90ms        ? ?/sec
workspace_sort/chained_projects                  1.00     18.1±1.34ms        ? ?/sec    1.03     18.7±0.62ms        ? ?/sec

@codecov-commenter

codecov-commenter commented Sep 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.50746% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.94%. Comparing base (ceac148) to head (16668fc).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../crates/resolving-deps-resolver/src/link_target.rs 97.87% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14523   +/-   ##
=======================================
  Coverage   88.94%   88.94%           
=======================================
  Files         709      709           
  Lines      127160   127198   +38     
=======================================
+ Hits       113097   113140   +43     
+ Misses      14063    14058    -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 16668fc

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 16668fce6f7a

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.392 ± 0.107 2.249 2.590 1.70 ± 0.18
pacquet@main 2.311 ± 0.127 2.223 2.596 1.64 ± 0.18
pnpr@HEAD 1.407 ± 0.135 1.284 1.657 1.00
pnpr@main 1.448 ± 0.122 1.296 1.635 1.03 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.3918170416800004,
      "stddev": 0.10734669056338553,
      "median": 2.39613073898,
      "user": 1.4448174999999999,
      "system": 1.4202865399999998,
      "min": 2.2492895119800003,
      "max": 2.5902584029800004
    },
    {
      "command": "pacquet@main",
      "mean": 2.31072684108,
      "stddev": 0.12700705960894465,
      "median": 2.2495706599800003,
      "user": 1.3754764000000002,
      "system": 1.3325125400000002,
      "min": 2.2234457249800004,
      "max": 2.5964688599800003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.40708317188,
      "stddev": 0.1346440561889791,
      "median": 1.3618244609799999,
      "user": 1.2677441000000003,
      "system": 1.2508659399999997,
      "min": 1.28350982998,
      "max": 1.65671205098
    },
    {
      "command": "pnpr@main",
      "mean": 1.44828007538,
      "stddev": 0.12231936801386552,
      "median": 1.41074143848,
      "user": 1.2577890999999999,
      "system": 1.2086155399999998,
      "min": 1.29613968298,
      "max": 1.63535463398
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 202.4 ± 5.3 195.3 210.2 1.00
pacquet@main 204.5 ± 7.7 192.9 219.1 1.01 ± 0.05
pnpr@HEAD 212.9 ± 9.3 201.7 234.6 1.05 ± 0.05
pnpr@main 217.6 ± 19.2 203.5 268.9 1.07 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.20240839198000002,
      "stddev": 0.005337757858756327,
      "median": 0.20120252148,
      "user": 0.18919722,
      "system": 0.46785132,
      "min": 0.19525560548,
      "max": 0.21015599948
    },
    {
      "command": "pacquet@main",
      "mean": 0.20445007558,
      "stddev": 0.007676600769015189,
      "median": 0.20611326948,
      "user": 0.18846091999999998,
      "system": 0.49798282,
      "min": 0.19293661448,
      "max": 0.21911733348
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.21294161398,
      "stddev": 0.00934907063780602,
      "median": 0.21127738698,
      "user": 0.20875362000000003,
      "system": 0.4644057200000001,
      "min": 0.20168729948,
      "max": 0.23462377448
    },
    {
      "command": "pnpr@main",
      "mean": 0.21757115398,
      "stddev": 0.019201376476438308,
      "median": 0.21286950548,
      "user": 0.20483812,
      "system": 0.46813371999999986,
      "min": 0.20351605148000002,
      "max": 0.26892428048
    }
  ]
}

Scenario: Isolated linker: repeat install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 7.4 ± 1.0 6.4 11.6 1.00
pacquet@main 7.6 ± 0.9 6.4 11.5 1.02 ± 0.18
pnpr@HEAD 7.6 ± 1.1 6.4 12.5 1.02 ± 0.20
pnpr@main 7.8 ± 1.4 6.3 13.2 1.06 ± 0.23
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.007399815238012429,
      "stddev": 0.0009589254755514765,
      "median": 0.00709216712,
      "user": 0.004579991925465838,
      "system": 0.0033372521739130404,
      "min": 0.00639707012,
      "max": 0.01164732112
    },
    {
      "command": "pacquet@main",
      "mean": 0.007551612851800766,
      "stddev": 0.0009348435304738461,
      "median": 0.007246991120000001,
      "user": 0.004418129118773942,
      "system": 0.003670229885057469,
      "min": 0.00635103312,
      "max": 0.01152602212
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.007575080515894431,
      "stddev": 0.0010624389162604071,
      "median": 0.007243276119999999,
      "user": 0.004464439002932548,
      "system": 0.003646762463343106,
      "min": 0.00643078912,
      "max": 0.012462355120000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.007822810150701753,
      "stddev": 0.0013824082406337693,
      "median": 0.00730506362,
      "user": 0.0042904807017543865,
      "system": 0.0040568973684210535,
      "min": 0.00633947512,
      "max": 0.01321064012
    }
  ]
}

Scenario: Isolated linker: repeat install, cold cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 7.2 ± 0.6 6.5 12.7 1.00
pacquet@main 7.4 ± 1.0 6.5 13.2 1.03 ± 0.16
pnpr@HEAD 7.5 ± 1.0 6.5 11.8 1.05 ± 0.16
pnpr@main 7.7 ± 1.2 6.4 14.7 1.08 ± 0.19
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.007150424557763159,
      "stddev": 0.0005712391572978026,
      "median": 0.007045898640000001,
      "user": 0.004372652763157894,
      "system": 0.003245392105263159,
      "min": 0.006454435140000001,
      "max": 0.012715333140000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.007364756573962269,
      "stddev": 0.0009610063516410995,
      "median": 0.007103915640000001,
      "user": 0.004336970062893084,
      "system": 0.003497796226415095,
      "min": 0.006501122140000001,
      "max": 0.013197614140000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.007486831211428569,
      "stddev": 0.0009869001086483394,
      "median": 0.00716589564,
      "user": 0.004276294782608696,
      "system": 0.0036956714285714272,
      "min": 0.006511959140000001,
      "max": 0.01182378014
    },
    {
      "command": "pnpr@main",
      "mean": 0.007708169201302681,
      "stddev": 0.0011713083403384551,
      "median": 0.007372970140000001,
      "user": 0.0044738446743295005,
      "system": 0.003725207662835245,
      "min": 0.006429159140000001,
      "max": 0.01471866714
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.418 ± 0.013 2.394 2.434 1.62 ± 0.13
pacquet@main 2.410 ± 0.006 2.399 2.417 1.61 ± 0.13
pnpr@HEAD 1.496 ± 0.120 1.359 1.670 1.00
pnpr@main 1.506 ± 0.144 1.382 1.721 1.01 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.41763889386,
      "stddev": 0.013000248318727009,
      "median": 2.41691942316,
      "user": 1.6475299800000003,
      "system": 1.42587336,
      "min": 2.39389688466,
      "max": 2.43382843766
    },
    {
      "command": "pacquet@main",
      "mean": 2.40963125686,
      "stddev": 0.005602849651355155,
      "median": 2.4087439666600003,
      "user": 1.7083063800000002,
      "system": 1.35167706,
      "min": 2.39947498566,
      "max": 2.41700731166
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4962896007600002,
      "stddev": 0.12002028944887881,
      "median": 1.48199955616,
      "user": 1.1588081799999999,
      "system": 1.17332676,
      "min": 1.35885875966,
      "max": 1.6703229936600001
    },
    {
      "command": "pnpr@main",
      "mean": 1.50637457956,
      "stddev": 0.14380728620557845,
      "median": 1.42161402966,
      "user": 1.19675278,
      "system": 1.2885998600000002,
      "min": 1.38223816566,
      "max": 1.72118395966
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 333.3 ± 25.7 305.5 372.5 1.30 ± 0.10
pacquet@main 316.7 ± 11.0 300.0 329.9 1.24 ± 0.05
pnpr@HEAD 268.1 ± 11.6 249.0 285.2 1.05 ± 0.05
pnpr@main 256.3 ± 5.4 247.3 262.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.33325087620000005,
      "stddev": 0.02570774392271105,
      "median": 0.32205650480000003,
      "user": 0.46552592,
      "system": 0.7426192799999999,
      "min": 0.3054618818,
      "max": 0.3724778988
    },
    {
      "command": "pacquet@main",
      "mean": 0.3167178589,
      "stddev": 0.010963859110512477,
      "median": 0.3192274163,
      "user": 0.42145091999999995,
      "system": 0.7183140800000001,
      "min": 0.3000069298,
      "max": 0.32985825080000003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.2681332173,
      "stddev": 0.011576240409344858,
      "median": 0.2678714378,
      "user": 0.18288652,
      "system": 0.48698937999999997,
      "min": 0.2490021578,
      "max": 0.2851665168
    },
    {
      "command": "pnpr@main",
      "mean": 0.256253232,
      "stddev": 0.005445645915015671,
      "median": 0.2566366763,
      "user": 0.17579772,
      "system": 0.44541117999999996,
      "min": 0.24733370580000003,
      "max": 0.2622178738
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.518 ± 0.021 1.498 1.569 5.99 ± 0.14
pacquet@main 1.523 ± 0.019 1.483 1.546 6.01 ± 0.14
pnpr@HEAD 0.254 ± 0.005 0.248 0.263 1.00
pnpr@main 0.256 ± 0.019 0.244 0.306 1.01 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.5183137269200002,
      "stddev": 0.020714967698430307,
      "median": 1.5166242353200001,
      "user": 0.71607278,
      "system": 0.8604969,
      "min": 1.49763309882,
      "max": 1.5688545368200002
    },
    {
      "command": "pacquet@main",
      "mean": 1.5225508927200002,
      "stddev": 0.018926039513057206,
      "median": 1.5191996838200001,
      "user": 0.75485878,
      "system": 0.8961832999999999,
      "min": 1.48322522782,
      "max": 1.5464659448200002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.25351825622000007,
      "stddev": 0.004827318937953867,
      "median": 0.25219978532,
      "user": 0.15669238000000002,
      "system": 0.46514679999999997,
      "min": 0.24767378882000002,
      "max": 0.26328884682000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.25643991202,
      "stddev": 0.018650063965023778,
      "median": 0.24912801332,
      "user": 0.17628258,
      "system": 0.46002849999999995,
      "min": 0.24432899782,
      "max": 0.30578946182
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 190.7 ± 12.4 170.2 211.0 2.04 ± 0.14
pacquet@main 192.6 ± 11.1 179.8 222.9 2.06 ± 0.13
pnpr@HEAD 96.0 ± 3.4 91.3 104.6 1.02 ± 0.04
pnpr@main 93.6 ± 2.1 91.1 97.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.19073580559428574,
      "stddev": 0.012440930864282714,
      "median": 0.19065893938000003,
      "user": 0.1843602028571428,
      "system": 0.06807565714285714,
      "min": 0.17015629338000002,
      "max": 0.21103466238000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.19261544864666671,
      "stddev": 0.011072774402197205,
      "median": 0.18940753938000002,
      "user": 0.17980432666666665,
      "system": 0.07126663333333333,
      "min": 0.17984823638000003,
      "max": 0.22292206038000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09595863057354839,
      "stddev": 0.003368915990107882,
      "median": 0.09569096138000001,
      "user": 0.032996479354838716,
      "system": 0.015557267741935485,
      "min": 0.09129783538,
      "max": 0.10461819038
    },
    {
      "command": "pnpr@main",
      "mean": 0.09363864081333333,
      "stddev": 0.0021223365314008364,
      "median": 0.09265546688000001,
      "user": 0.031536426666666666,
      "system": 0.015279613333333334,
      "min": 0.09109185738,
      "max": 0.09738267338
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 688.0 ± 53.4 600.2 766.1 1.00
pacquet@main 699.6 ± 44.7 643.7 784.8 1.02 ± 0.10
pnpm@HEAD 2935.1 ± 60.0 2866.8 3046.6 4.27 ± 0.34
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6879619100022223,
      "stddev": 0.05341266054013006,
      "median": 0.67479732278,
      "user": 0.6709207155555554,
      "system": 0.16869322222222222,
      "min": 0.60017010778,
      "max": 0.76607073778
    },
    {
      "command": "pacquet@main",
      "mean": 0.6995912606688891,
      "stddev": 0.04466303185833367,
      "median": 0.69671839578,
      "user": 0.6843370488888888,
      "system": 0.168733,
      "min": 0.64369060178,
      "max": 0.78477196678
    },
    {
      "command": "pnpm@HEAD",
      "mean": 2.935087943668889,
      "stddev": 0.06000107572401545,
      "median": 2.91985306878,
      "user": 4.1647373822222225,
      "system": 0.29264111111111113,
      "min": 2.86676611878,
      "max": 3.04661228878
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.391 ± 0.137 4.281 4.691 1.28 ± 0.05
pacquet@main 4.385 ± 0.100 4.274 4.556 1.28 ± 0.04
pnpr@HEAD 3.454 ± 0.095 3.359 3.680 1.01 ± 0.04
pnpr@main 3.429 ± 0.081 3.353 3.608 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.39116800466,
      "stddev": 0.13676726827584149,
      "median": 4.32637611776,
      "user": 1.43439002,
      "system": 1.3339108000000002,
      "min": 4.28122323776,
      "max": 4.69137358876
    },
    {
      "command": "pacquet@main",
      "mean": 4.38489577446,
      "stddev": 0.09980209829996277,
      "median": 4.37713813526,
      "user": 1.40411272,
      "system": 1.383983,
      "min": 4.27436528176,
      "max": 4.55639697576
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.454254507660001,
      "stddev": 0.09472181239749437,
      "median": 3.44652164626,
      "user": 1.33396452,
      "system": 1.3957165999999999,
      "min": 3.35860892376,
      "max": 3.67965263576
    },
    {
      "command": "pnpr@main",
      "mean": 3.42938121846,
      "stddev": 0.0807772001511116,
      "median": 3.40570604776,
      "user": 1.32779962,
      "system": 1.3843358000000001,
      "min": 3.35277679976,
      "max": 3.60795932976
    }
  ]
}

Scenario: GVS linker: fresh restore, hot cache + hot store

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store — the layout pnpm 12 installs into by default. Comparable to that scenario head-to-head.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 117.6 ± 6.6 109.1 131.0 1.00
pacquet@main 123.7 ± 5.9 114.3 138.1 1.05 ± 0.08
pnpr@HEAD 147.6 ± 10.7 131.2 171.2 1.26 ± 0.11
pnpr@main 134.2 ± 8.4 124.2 153.6 1.14 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.11756801764695654,
      "stddev": 0.0065745824580590315,
      "median": 0.11695104056,
      "user": 0.15949559304347827,
      "system": 0.14998451304347823,
      "min": 0.10908030256000001,
      "max": 0.13097848856000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.12370599416000003,
      "stddev": 0.0059172436725677836,
      "median": 0.12355096856,
      "user": 0.15714273000000004,
      "system": 0.15927229999999998,
      "min": 0.11429920556,
      "max": 0.13810169756000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.14758018889333335,
      "stddev": 0.010678006762915325,
      "median": 0.14749959106000002,
      "user": 0.18063362444444442,
      "system": 0.16179826666666663,
      "min": 0.13119681556,
      "max": 0.17119011056000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.13420445079529414,
      "stddev": 0.008397288199447033,
      "median": 0.13202873856000003,
      "user": 0.1646586211764706,
      "system": 0.14898448235294115,
      "min": 0.12417087556,
      "max": 0.15364556156000003
    }
  ]
}

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14523
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
109.08 ms
(-36.49%)Baseline: 171.75 ms
206.10 ms
(52.93%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,393.90 ms
(-11.18%)Baseline: 2,695.11 ms
3,234.14 ms
(74.02%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,497.63 ms
(-17.11%)Baseline: 1,806.76 ms
2,168.11 ms
(69.08%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
305.46 ms
(-23.39%)Baseline: 398.74 ms
478.48 ms
(63.84%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
170.16 ms
(-28.13%)Baseline: 236.75 ms
284.10 ms
(59.89%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,249.29 ms
(-5.27%)Baseline: 2,374.39 ms
2,849.27 ms
(78.94%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,281.22 ms
(-3.47%)Baseline: 4,434.96 ms
5,321.95 ms
(80.44%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
195.26 ms
(-20.60%)Baseline: 245.91 ms
295.10 ms
(66.17%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
600.17 ms
(+3.83%)Baseline: 578.04 ms
693.65 ms
(86.52%)
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
6.45 ms
(-12.88%)Baseline: 7.41 ms
8.89 ms
(72.60%)
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
6.40 ms
(-8.29%)Baseline: 6.98 ms
8.37 ms
(76.42%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14523
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
131.20 ms
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,358.86 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
247.67 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
249.00 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
91.30 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,283.51 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,358.61 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
201.69 ms
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
6.51 ms
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
6.43 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit a3308ac into main Sep 4, 2026
60 of 67 checks passed
@zkochan
zkochan deleted the perf/next-walk branch September 4, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants