Skip to content

perf(resolving-deps-resolver): compute previously_resolved_children once per node - #13565

Merged
zkochan merged 1 commit into
mainfrom
perf-previously-resolved-children
Aug 1, 2026
Merged

zkochan merged 1 commit into
mainfrom
perf-previously-resolved-children

Conversation

@zkochan

@zkochan zkochan commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #13564, which merged before this could be pushed to it.

Walker::record_walked_node calls previously_resolved_children twice with
identical arguments — once to seed the node's graph children, once to seed its
record edges. Each call rescans the ancestor pkg-id chain and, on a match,
re-realizes every matching occurrence's children, so the second one is pure
repeat work in the peer-resolution hot path. The duplication predates
#13564; extracting the phase into one function is what made it visible.

Build the record edges first and iterate them by reference for the graph
children. Cost accounting:

  • Common case (the node's package is not in its own ancestor chain, so the
    helper early-returns an empty map): one chain scan instead of two, no clones
    either way — strictly less work.
  • Cycle case: the per-entry clones in the loop replace the ones the second
    call made while rebuilding the map, so the clone count is unchanged, and one
    chain scan plus one realize_children pass go away.

CodeRabbit raised this on #13564 and suggested cloning the map into the
first loop instead; that trades one cost for another and adds a clone to the hot
path, which #13553 explicitly ruled out. Building the record edges first
removes the call without adding one.

just ready green — 7541 tests passed, 0 failures.

Squash Commit Body

record_walked_node called previously_resolved_children twice with identical
arguments — once to seed the graph children, once to seed the record edges.
Each call rescans the ancestor pkg-id chain and, on a match, re-realizes every
matching occurrence's children, so the second one was pure repeat work in the
peer-resolution hot path.

Build the record edges first and iterate them by reference for the graph
children. The clone count is unchanged — the per-entry clones in the loop
replace the ones the second call made while rebuilding the map — while one
chain scan and one realize_children pass go away, and the common case (the
node's package is not in its own ancestor chain, so the map is empty) now does
strictly less work.

Raised by CodeRabbit on pnpm/pnpm#13564. Its suggested fix cloned the map into
the first loop instead, which trades one cost for another; building the record
edges first removes the call without adding a clone.

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.
  • 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.
  • Updated the documentation if needed.

Written by an agent (Claude Code, claude-opus-5[1m]).


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

…nce per node

record_walked_node called previously_resolved_children twice with identical
arguments — once to seed the graph children, once to seed the record edges.
Each call rescans the ancestor pkg-id chain and, on a match, re-realizes every
matching occurrence's children, so the second one was pure repeat work in the
peer-resolution hot path.

Build the record edges first and iterate them by reference for the graph
children. The clone count is unchanged — the per-entry clones in the loop
replace the ones the second call made while rebuilding the map — while one
chain scan and one realize_children pass go away, and the common case (the
node's package is not in its own ancestor chain, so the map is empty) now does
strictly less work.

Raised by CodeRabbit on #13564. Its suggested fix cloned the map into
the first loop instead, which trades one cost for another; building the record
edges first removes the call without adding a clone.
Copilot AI review requested due to automatic review settings August 1, 2026 16:17
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@zkochan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3fb62803-9e64-4bcd-a14b-759996374d41

📥 Commits

Reviewing files that changed from the base of the PR and between 4c02bbe and 16012ab.

📒 Files selected for processing (1)
  • pnpm/crates/resolving-deps-resolver/src/resolve_peers/finalize.rs

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.

@greptile-apps

greptile-apps Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge, with no actionable correctness, security, build, or maintainability issues identified.

The cached helper result is identical to the former two results, intervening edge handling does not affect helper state, and all child and peer overlays retain their previous ordering and targets.

Reviews (1): Last reviewed commit: "perf(resolving-deps-resolver): compute p..." | Re-trigger Greptile

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Avoid duplicate previously_resolved_children scans in peer-walk finalization

✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Compute previously_resolved_children once per walked node to remove repeated ancestor-chain
 scans.
• Reuse the computed map to seed both graph children and per-node record edges.
• Preserve behavior while reducing work on the peer-resolution hot path.
Diagram

graph TD
  A["Walker::record_walked_node"] --> B["previously_resolved_children"] --> C["record_edges (alias→NodeId)"] --> D["Build graph_children"] --> E[("DependenciesGraph")]
  C --> F[("NodeRecord")]
  F --> G["build_final_dep_paths"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Change add_graph_child_or_pending to accept borrowed alias/NodeId
  • ➕ Could avoid per-entry clones when seeding graph children from record_edges.
  • ➕ Keeps single computation of previously_resolved_children while reducing allocations further.
  • ➖ More invasive API change; touches multiple call sites and increases review surface.
  • ➖ Borrowing may be awkward because pending-edge capture likely requires owned data anyway.
2. Keep two calls but memoize inside previously_resolved_children
  • ➕ Preserves current call structure and reduces duplication for any future callers.
  • ➕ Encapsulates caching behind the helper.
  • ➖ Requires cache key design (parent chain identity, pkg id) and invalidation rules.
  • ➖ Adds state/memory overhead to a hot path for a localized benefit.

Recommendation: The PR’s approach (compute once in record_walked_node and reuse the map) is the best trade-off: minimal change surface, no behavior changes, and removes redundant chain scans/child realization. Further clone reductions are possible via borrowing API adjustments, but they’re not worth the added complexity unless profiling shows clones dominate after this optimization.

Files changed (1) +20 / -15

Enhancement (1) +20 / -15
finalize.rsReuse previously-resolved children map for both graph children and record edges +20/-15

Reuse previously-resolved children map for both graph children and record edges

• 'record_walked_node' now computes 'previously_resolved_children' once, stores it in 'record_edges', and iterates it by reference to seed 'graph_children'. The later record-edge construction reuses and extends the same map (regular children + own resolved peers), avoiding a second ancestor-chain scan and duplicate child realization work.

pnpm/crates/resolving-deps-resolver/src/resolve_peers/finalize.rs

@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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces duplicate work in pacquet’s peer-resolution hot path by computing previously_resolved_children once per visited node in Walker::record_walked_node, then reusing the result to seed both the node’s record edges and its graph children.

Changes:

  • Compute previously_resolved_children(...) once and store it in record_edges early in record_walked_node.
  • Populate initial graph_children by iterating record_edges by reference (cloning per entry as required by add_graph_child_or_pending’s by-value signature).
  • Reword/relocate the record-edges comment to reflect the new construction order without changing behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.05     11.9±0.04ms    31.4 MB/sec    1.00     11.3±0.25ms    33.0 MB/sec
packument/parse                                  1.06     38.7±0.08µs  1716.1 MB/sec    1.00     36.6±0.06µs  1811.9 MB/sec
tarball/download_dependency                      1.01      2.2±0.06ms  1994.7 KB/sec    1.00      2.1±0.06ms  2024.0 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00    174.0±2.14ms 92.0 KElem/sec    1.00    173.9±1.86ms 92.0 KElem/sec

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.95%. Comparing base (fea49c1) to head (16012ab).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13565      +/-   ##
==========================================
- Coverage   87.95%   87.95%   -0.01%     
==========================================
  Files         556      556              
  Lines       97290    97300      +10     
==========================================
+ Hits        85576    85583       +7     
- Misses      11714    11717       +3     

☔ 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.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 16012ab98e3b

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.521 ± 0.155 2.358 2.778 1.74 ± 0.15
pacquet@main 2.419 ± 0.099 2.331 2.678 1.67 ± 0.13
pnpr@HEAD 1.485 ± 0.124 1.364 1.746 1.03 ± 0.11
pnpr@main 1.446 ± 0.092 1.343 1.614 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.521266788,
      "stddev": 0.1545196585882089,
      "median": 2.5135759223,
      "user": 1.60803592,
      "system": 1.3500868799999997,
      "min": 2.3578562602999997,
      "max": 2.7779110063,
      "times": [
        2.3578562602999997,
        2.5573782523,
        2.7779110063,
        2.6131112183,
        2.6353876513,
        2.3741473503,
        2.3683541483,
        2.3685245093,
        2.6902238913,
        2.4697735922999997
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4187185291,
      "stddev": 0.09939273943418869,
      "median": 2.3868497528,
      "user": 1.5273126199999998,
      "system": 1.24806448,
      "min": 2.3306014433,
      "max": 2.6778985483,
      "times": [
        2.3536781753,
        2.3572690172999997,
        2.3753268483,
        2.3733438503,
        2.3983726573,
        2.4341240052999997,
        2.6778985483,
        2.4523687183,
        2.4342020273,
        2.3306014433
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4853067448999995,
      "stddev": 0.12441099095159656,
      "median": 1.4438368337999998,
      "user": 1.00152732,
      "system": 1.17589238,
      "min": 1.3642444343,
      "max": 1.7456462813,
      "times": [
        1.5496164943,
        1.3642444343,
        1.5726514853,
        1.3655798262999999,
        1.4287573053,
        1.7456462813,
        1.4031999913,
        1.3819382032999998,
        1.4589163622999999,
        1.5825170652999998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.4455424290999999,
      "stddev": 0.09249803312502602,
      "median": 1.4608860713,
      "user": 1.0102363200000002,
      "system": 1.12609878,
      "min": 1.3430553033,
      "max": 1.6138274563,
      "times": [
        1.5498080743,
        1.3463229163,
        1.4603727913,
        1.4799441202999999,
        1.3430553033,
        1.4613993512999999,
        1.4785122783,
        1.3762191293,
        1.3459628703,
        1.6138274563
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 256.8 ± 7.5 241.1 266.4 1.05 ± 0.04
pacquet@main 245.5 ± 6.1 238.2 258.4 1.00
pnpr@HEAD 267.5 ± 6.6 259.7 276.3 1.09 ± 0.04
pnpr@main 270.1 ± 4.4 263.8 277.2 1.10 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25683984258000003,
      "stddev": 0.007471536571495906,
      "median": 0.25773112278,
      "user": 0.20711512,
      "system": 0.5340391,
      "min": 0.24113246678,
      "max": 0.26642827078000003,
      "times": [
        0.26534796878000005,
        0.25592937978,
        0.25953286578,
        0.25240846878,
        0.25215217778000004,
        0.26006721978,
        0.25384109378,
        0.26155851378000006,
        0.24113246678,
        0.26642827078000003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.24554539998,
      "stddev": 0.006148523189882438,
      "median": 0.24484510678,
      "user": 0.20495232,
      "system": 0.4941413,
      "min": 0.23816118478,
      "max": 0.25838404878000004,
      "times": [
        0.23951167378000002,
        0.24308536378,
        0.24387029878,
        0.24581991478,
        0.24647224178000002,
        0.25838404878000004,
        0.24598714978,
        0.25298749278000005,
        0.24117463078,
        0.23816118478
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26753161218000004,
      "stddev": 0.006567256629932788,
      "median": 0.26745788078000005,
      "user": 0.20706712,
      "system": 0.5352428,
      "min": 0.25967237178,
      "max": 0.27634811678000004,
      "times": [
        0.27405624778000004,
        0.25967237178,
        0.27634811678000004,
        0.27042815478000004,
        0.26012239778,
        0.26087798878,
        0.27568592078000004,
        0.27004110878000004,
        0.26487465278000005,
        0.26320916178000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.27007633198000003,
      "stddev": 0.004430023621429269,
      "median": 0.2709498262800001,
      "user": 0.20804331999999998,
      "system": 0.5324669,
      "min": 0.26383326578000005,
      "max": 0.27718932778000005,
      "times": [
        0.26659241378000004,
        0.27337404478000005,
        0.27266783578000003,
        0.26784539978000005,
        0.26407906678000004,
        0.26383326578000005,
        0.27246283078000005,
        0.26943682178000006,
        0.27718932778000005,
        0.27328231278000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.573 ± 0.018 2.550 2.610 1.67 ± 0.10
pacquet@main 2.577 ± 0.013 2.559 2.597 1.67 ± 0.10
pnpr@HEAD 1.539 ± 0.088 1.421 1.659 1.00
pnpr@main 1.591 ± 0.148 1.445 1.837 1.03 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.57325970662,
      "stddev": 0.01775495234619004,
      "median": 2.56921713592,
      "user": 1.4458377199999999,
      "system": 1.29809666,
      "min": 2.54980264092,
      "max": 2.60967738292,
      "times": [
        2.60967738292,
        2.5571736999200003,
        2.5904167569200003,
        2.57282613192,
        2.56337486992,
        2.56243980192,
        2.5841830049200003,
        2.57709463692,
        2.54980264092,
        2.56560813992
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5768009759200003,
      "stddev": 0.012817112222171814,
      "median": 2.57274845742,
      "user": 1.4468072199999997,
      "system": 1.27970836,
      "min": 2.55860079592,
      "max": 2.59717926092,
      "times": [
        2.59717926092,
        2.56542928392,
        2.58282782992,
        2.57495443492,
        2.57021723792,
        2.59153124492,
        2.55860079592,
        2.56699351592,
        2.58973367492,
        2.57054247992
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5387176319200002,
      "stddev": 0.08798004806437722,
      "median": 1.55989940092,
      "user": 0.9862734200000001,
      "system": 1.1548742600000002,
      "min": 1.42120545392,
      "max": 1.65850008992,
      "times": [
        1.58439130292,
        1.4520581569200002,
        1.6014784529200001,
        1.65850008992,
        1.5354074989200002,
        1.43710162392,
        1.61071703392,
        1.42120545392,
        1.62193797292,
        1.4643787329200002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5914437418200003,
      "stddev": 0.14757426982382946,
      "median": 1.53929388592,
      "user": 0.9923996199999999,
      "system": 1.16377326,
      "min": 1.4452778669200002,
      "max": 1.83742965292,
      "times": [
        1.4538341159200001,
        1.56010905492,
        1.46807282892,
        1.4452778669200002,
        1.50743496192,
        1.51847871692,
        1.80677999192,
        1.83742965292,
        1.58352867092,
        1.7334915569200002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 384.5 ± 6.1 370.9 393.2 1.31 ± 0.04
pacquet@main 386.7 ± 10.7 368.6 403.3 1.32 ± 0.05
pnpr@HEAD 301.7 ± 3.1 297.4 305.6 1.03 ± 0.03
pnpr@main 293.5 ± 6.9 283.7 305.1 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.38454980676000006,
      "stddev": 0.006110371439421282,
      "median": 0.38615750236,
      "user": 0.5070553799999999,
      "system": 0.6612995199999998,
      "min": 0.37087857286000003,
      "max": 0.39317564786000003,
      "times": [
        0.38585976286,
        0.38645524186,
        0.38501655686,
        0.37976715586,
        0.38089227086,
        0.38760369986,
        0.39317564786000003,
        0.3872914538600001,
        0.37087857286000003,
        0.3885577048600001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.38671968316000005,
      "stddev": 0.010717177726453786,
      "median": 0.38737784186,
      "user": 0.49074098,
      "system": 0.6712037200000001,
      "min": 0.36855688786000007,
      "max": 0.40325516986,
      "times": [
        0.38540095986,
        0.38973552986000004,
        0.39047580185999997,
        0.38935472386000003,
        0.38148035686000004,
        0.38441833286000004,
        0.40077241286,
        0.40325516986,
        0.36855688786000007,
        0.37374665586
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30169113896,
      "stddev": 0.0030736257349052074,
      "median": 0.30235506786,
      "user": 0.21974948,
      "system": 0.4986575200000001,
      "min": 0.29742178186,
      "max": 0.30557716586000006,
      "times": [
        0.30267414686000005,
        0.29742178186,
        0.30234108185999997,
        0.29818373385999997,
        0.30530789986000006,
        0.29761029486,
        0.30102156986000006,
        0.30557716586000006,
        0.30236905386,
        0.30440466086000006
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29348623936,
      "stddev": 0.006899353854947186,
      "median": 0.29330072236000004,
      "user": 0.19434387999999997,
      "system": 0.49541591999999995,
      "min": 0.28367992286,
      "max": 0.30505203786,
      "times": [
        0.29270462186,
        0.29754838986,
        0.29558381586000004,
        0.2938968228600001,
        0.30263685786000005,
        0.28764850486000004,
        0.28809784886,
        0.28801357086,
        0.28367992286,
        0.30505203786
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.726 ± 0.006 1.718 1.738 5.82 ± 0.18
pacquet@main 1.715 ± 0.004 1.708 1.720 5.79 ± 0.18
pnpr@HEAD 0.296 ± 0.009 0.280 0.309 1.00
pnpr@main 0.307 ± 0.005 0.297 0.315 1.03 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.7262008867200003,
      "stddev": 0.006137846766867498,
      "median": 1.72365812992,
      "user": 0.6914372799999999,
      "system": 0.7465535400000001,
      "min": 1.7177115269200003,
      "max": 1.7377025559200001,
      "times": [
        1.7223257239200003,
        1.7237017939200001,
        1.7234761659200002,
        1.7314429359200003,
        1.72524665392,
        1.7377025559200001,
        1.7177115269200003,
        1.7236144659200001,
        1.73393066392,
        1.7228563809200002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.71468091192,
      "stddev": 0.003698350818094427,
      "median": 1.71508033892,
      "user": 0.6782887799999999,
      "system": 0.76042814,
      "min": 1.7082379329200001,
      "max": 1.72010419592,
      "times": [
        1.71314950792,
        1.7177203839200001,
        1.71056648092,
        1.7082379329200001,
        1.71548844692,
        1.71467223092,
        1.71194050492,
        1.71750283392,
        1.71742660092,
        1.72010419592
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29635562512,
      "stddev": 0.009157126408121793,
      "median": 0.29824578442000005,
      "user": 0.17617438,
      "system": 0.5238114399999999,
      "min": 0.28044776792000004,
      "max": 0.30855634092,
      "times": [
        0.29359463892,
        0.28044776792000004,
        0.28207271292,
        0.30092258792,
        0.30041722692,
        0.30606833392,
        0.29778732192,
        0.29870424692,
        0.29498507292000004,
        0.30855634092
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30651035752,
      "stddev": 0.005202098253965913,
      "median": 0.30616756992,
      "user": 0.19008377999999998,
      "system": 0.5440103399999999,
      "min": 0.29710432792,
      "max": 0.31473675292000003,
      "times": [
        0.31473675292000003,
        0.31130034092000003,
        0.30022805192,
        0.29710432792,
        0.30490999492000004,
        0.31042948392,
        0.30879423892,
        0.30636252692,
        0.30597261292,
        0.30526524392
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 179.1 ± 2.9 174.0 183.0 2.05 ± 0.05
pacquet@main 181.7 ± 5.8 176.5 195.8 2.08 ± 0.08
pnpr@HEAD 87.2 ± 1.5 84.6 90.7 1.00
pnpr@main 87.3 ± 0.7 85.4 89.3 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.17910262538,
      "stddev": 0.00291997633161522,
      "median": 0.17910672538,
      "user": 0.15967946499999996,
      "system": 0.0755194825,
      "min": 0.17402849038,
      "max": 0.18303792138,
      "times": [
        0.18267047038,
        0.17835127938,
        0.17428443338,
        0.17707497938,
        0.17944060838,
        0.17814580238,
        0.17877284238,
        0.18108666338,
        0.18163335138,
        0.17679214738,
        0.18217835538,
        0.17402849038,
        0.17584260238,
        0.18054168838,
        0.18303792138,
        0.18176037038
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.181742813505,
      "stddev": 0.005834006039948365,
      "median": 0.18064918487999998,
      "user": 0.16676046500000005,
      "system": 0.06764504499999999,
      "min": 0.17654211838,
      "max": 0.19583560538,
      "times": [
        0.18230437238,
        0.19461321738,
        0.18456595538,
        0.18263892137999999,
        0.17732268538,
        0.17867957638,
        0.18155323037999999,
        0.18075532938,
        0.18298665538,
        0.17711385238,
        0.18054304038,
        0.19583560538,
        0.17654211838,
        0.17686695938,
        0.17721400137999999,
        0.17834949538
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08724402982117647,
      "stddev": 0.001481928574684645,
      "median": 0.08735158438000001,
      "user": 0.022140575294117646,
      "system": 0.00762714294117647,
      "min": 0.08464597238,
      "max": 0.09070699938000001,
      "times": [
        0.08464597238,
        0.08486295038000001,
        0.08658955838,
        0.08712647638000001,
        0.08752206038,
        0.08592005838000001,
        0.09009977738000001,
        0.08502309238000001,
        0.08779224838000001,
        0.08751467738,
        0.08771613538,
        0.08756920838000001,
        0.08778777938000001,
        0.08695528538000001,
        0.08727094738,
        0.08779443338000001,
        0.08836316238000001,
        0.08596445138,
        0.08743222138000001,
        0.08716990838000001,
        0.08927139038000001,
        0.08610470638,
        0.08923208538,
        0.08879500338,
        0.08491310538,
        0.08801689138,
        0.08691321538,
        0.08882786638000001,
        0.08514545138,
        0.09070699938000001,
        0.08555835838,
        0.08680942038,
        0.08791928638,
        0.08696282938000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.0873449606830303,
      "stddev": 0.000676649883443402,
      "median": 0.08733145238000001,
      "user": 0.021538430909090918,
      "system": 0.007962780606060605,
      "min": 0.08543315238,
      "max": 0.08930482238000001,
      "times": [
        0.08543315238,
        0.08729768838,
        0.08750468738,
        0.08722092538000001,
        0.08743975538000001,
        0.08759536838000001,
        0.08723172438,
        0.08842537938,
        0.08689034238000001,
        0.08755008438,
        0.08730144638000001,
        0.08731425038000001,
        0.08729809938000001,
        0.08677835338,
        0.08761925338000001,
        0.08796973238000001,
        0.08691916638000001,
        0.08745636638000001,
        0.08731607338000001,
        0.08728154838,
        0.08752811138000001,
        0.08755409138,
        0.08680448138,
        0.08719594838000001,
        0.08765021138000001,
        0.08747134538000001,
        0.08805052438000001,
        0.08733145238000001,
        0.08739488138000001,
        0.08930482238000001,
        0.08545627638,
        0.08755259838000001,
        0.08724556038
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.594 ± 0.504 1.068 2.653 1.00
pacquet@main 1.717 ± 0.529 1.136 2.917 1.08 ± 0.48
pnpm@HEAD 2.888 ± 0.047 2.807 2.961 1.81 ± 0.57
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.5944708373288887,
      "stddev": 0.5043256678471489,
      "median": 1.44191039744,
      "user": 1.4980587977777777,
      "system": 0.20013074222222219,
      "min": 1.0675181564399998,
      "max": 2.65349956244,
      "times": [
        1.0853301494399998,
        2.65349956244,
        1.42937579844,
        1.44191039744,
        1.0675181564399998,
        2.04282943244,
        1.50284674644,
        1.32426135744,
        1.8026659354399999
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.7165501338844444,
      "stddev": 0.5291873152282507,
      "median": 1.62639002044,
      "user": 1.6086832422222224,
      "system": 0.20363096444444445,
      "min": 1.1355495144399999,
      "max": 2.91688555344,
      "times": [
        1.48612311144,
        1.73116639244,
        1.1524688164399999,
        1.6164547064399999,
        2.91688555344,
        1.62639002044,
        1.96532594744,
        1.1355495144399999,
        1.81858714244
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 2.8879934596622223,
      "stddev": 0.046689313731450736,
      "median": 2.87576134544,
      "user": 4.421044575555555,
      "system": 0.2584617422222222,
      "min": 2.80701366944,
      "max": 2.96083773844,
      "times": [
        2.80701366944,
        2.96083773844,
        2.87576134544,
        2.85654534744,
        2.93200848144,
        2.92956956544,
        2.87402551044,
        2.86431754444,
        2.89186193444
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.452 ± 0.085 4.393 4.688 1.26 ± 0.05
pacquet@main 4.525 ± 0.139 4.405 4.762 1.28 ± 0.06
pnpr@HEAD 3.545 ± 0.116 3.443 3.819 1.00
pnpr@main 3.556 ± 0.100 3.450 3.736 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.45152019058,
      "stddev": 0.0847783951391418,
      "median": 4.42572029568,
      "user": 1.62973288,
      "system": 1.3383206199999997,
      "min": 4.39255728018,
      "max": 4.6875536041800006,
      "times": [
        4.42341640318,
        4.43744333218,
        4.6875536041800006,
        4.4594670801800005,
        4.41188695018,
        4.43660290118,
        4.39255728018,
        4.41798750318,
        4.42802418818,
        4.42026266318
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.52505221778,
      "stddev": 0.13880017320064472,
      "median": 4.464305062179999,
      "user": 1.6523651799999999,
      "system": 1.3506281199999999,
      "min": 4.4048441481800005,
      "max": 4.76184214718,
      "times": [
        4.49635927818,
        4.41254735218,
        4.43225084618,
        4.4237706471800005,
        4.4048441481800005,
        4.72212014318,
        4.50021944118,
        4.4258353471800005,
        4.67073282718,
        4.76184214718
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5449707643799995,
      "stddev": 0.11586916182082242,
      "median": 3.50563807318,
      "user": 1.17120058,
      "system": 1.21066002,
      "min": 3.44322033318,
      "max": 3.81898459718,
      "times": [
        3.81898459718,
        3.62802941618,
        3.44322033318,
        3.44753945418,
        3.50250464018,
        3.4879271541800003,
        3.5794279811800003,
        3.58680687818,
        3.50877150618,
        3.44649568318
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5560848112800003,
      "stddev": 0.09985062918369657,
      "median": 3.52955620668,
      "user": 1.15014828,
      "system": 1.18315412,
      "min": 3.44988802418,
      "max": 3.73586975218,
      "times": [
        3.46235957918,
        3.47424215718,
        3.57601403018,
        3.73586975218,
        3.44988802418,
        3.60587694318,
        3.50998990818,
        3.54912250518,
        3.70352641418,
        3.49395879918
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13565
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,549.80 ms
(-4.70%)Baseline: 2,675.68 ms
3,210.82 ms
(79.41%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,717.71 ms
(-5.35%)Baseline: 1,814.86 ms
2,177.83 ms
(78.87%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
370.88 ms
(-20.91%)Baseline: 468.94 ms
562.72 ms
(65.91%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
174.03 ms
(-20.29%)Baseline: 218.32 ms
261.99 ms
(66.43%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,357.86 ms
(-2.95%)Baseline: 2,429.62 ms
2,915.55 ms
(80.87%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,392.56 ms
(-2.90%)Baseline: 4,523.79 ms
5,428.54 ms
(80.92%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
241.13 ms
(-14.37%)Baseline: 281.60 ms
337.92 ms
(71.36%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
1,067.52 ms
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13565
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)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,421.21 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
280.45 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
297.42 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
84.65 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,364.24 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,443.22 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
259.67 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit edb5bf9 into main Aug 1, 2026
34 checks passed
@zkochan
zkochan deleted the perf-previously-resolved-children branch August 1, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants