Repository navigation
refactor(deps-restorer): run the frozen install as a pipeline of phases - #14739
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe frozen lockfile installation path now uses borrowed dependency groups, phase-specific planning and execution structs, aggregated lockfile entries, and separate materialization, fetch, link, build, and output stages. ChangesInstallation pipeline consolidation
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~60 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The installation pipeline refactor preserves the existing frozen-lockfile flow while organizing it into explicit phases. No concrete merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant InstallFrozenLockfile
participant MaterializationPlan
participant FetchPhase
participant LinkPhase
participant BuildPhase
InstallFrozenLockfile->>MaterializationPlan: plan_materialization
InstallFrozenLockfile->>FetchPhase: fetch with settled skip set
FetchPhase-->>InstallFrozenLockfile: fetched packages and failures
InstallFrozenLockfile->>LinkPhase: link phase inputs
LinkPhase-->>InstallFrozenLockfile: linked packages
InstallFrozenLockfile->>BuildPhase: build phase inputs
BuildPhase-->>InstallFrozenLockfile: build results
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Micro-Benchmark ResultsLinux |
PR Summary by QodoRefactor frozen lockfile installs into explicit phases
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14739 +/- ##
==========================================
+ Coverage 90.22% 90.24% +0.01%
==========================================
Files 794 794
Lines 152466 152580 +114
==========================================
+ Hits 137560 137690 +130
+ Misses 14906 14890 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
|
|||||||||
|
Both Qodo findings addressed:
Written by an agent (Claude Code, claude-fable-5-1). |
|
Code review by qodo was updated up to the latest commit 35a881c |
PR Code Suggestions ✨Warning
|
|||||||||
|
Failed fetches appear as completed phases — real, and introduced by the timer move two commits earlier: the event was logged after the result was stored but before it was checked. It follows the Written by an agent (Claude Code, claude-fable-5-1). |
`InstallFrozenLockfile` was generic over any `IntoIterator` of groups, yet its one caller hands it a `Vec` and `run` collected the iterator into another `Vec` on entry. A slice borrow drops the type parameter and the copy. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
`InstallFrozenLockfile::run` decided the slot layout, the engine name, the directory-clone cache and the store-side prefetch inline, between the store-index writer and the skip set. `plan_materialization` owns those decisions and hands back one `MaterializationPlan` the rest of the install reads. The plan borrows the allow-builds policy rather than owning it: the directory-clone cache keeps a reference to the policy, so the two cannot live in one struct. The method returns an explicit `Send` future that captures only its `Copy` inputs — an `async fn` holding `&self` would not be `Send`, because the verification override is a boxed future without `Sync`. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
Resolving the pending host probe, delivering its engine name to the directory-clone cache's slot, and computing the skip set were the next fifty lines of `InstallFrozenLockfile::run`. `settle_skip_set` owns them and takes the half of the plan the host probe decides, `HostPlan`, by value. Every owned input `run` consumes — the early host detection, the node version, the seed skip set, the verification override — is now taken off `self` before the phases borrow it, so `self` stays whole for their `&self` calls. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…ts own `run` assembled the `CreateVirtualStore` and the concurrent verification inline, which meant holding a dozen of the install's inputs just to forward them. `fetch` reads them off `self` and takes only what the phases before it produced: the store-side prefetch, the directory-clone cache, the writer, the skip set and the verification override. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…t whole `run` unpacked the six fields of the fetch's output and the four of the link's only to forward them, one by one, into the next phase. `link` takes the fetch output by reference, and `run` keeps both outputs as the values they are, reading a field where a phase needs it. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…place `build` takes the fetch and link outputs by reference and reads the layout, the policy and the linker off the install context. With every phase a method, `run` no longer destructures `self` or the plan: it reads the few fields it still needs where it needs them, and forwards each phase's output whole to the next. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…lues `run` took the four owned inputs off `self` one by one, unpacked the skip-set result into three names, and derived the lockfile's maps a last time for the injected-deps epilogue. `take_owned` hands back the owned inputs as one value, the skip-set result stays whole, and `collect_injected_deps` takes a `LockfileEntries` like every other reader of the two maps. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…as one value Every phase began by destructuring `self` into five to eleven names it needed, because a future holding `&self` is not `Send`. `FrozenInputs` is the `Copy` view of those inputs, built by `inputs()` and captured as one value; a phase reads `install.lockfile` where it needs it. The three dependency-group flags the phases each recomputed come from one `included()`, and `settle_engine_name` owns the match that fills the directory-clone cache's slot once the host is known. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
`plan_materialization` unpacked the engine-name plan into three names and matched on two of them to pick the directory-clone cache's engine source. The plan stays one value, and `EngineNamePlan::source` owns that match. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
The `create_virtual_store` timer started in `run` before the fetch phase, which now loads the pnpmfile's fetcher session before it materializes anything, so a pnpmfile with custom fetchers charged its setup to the store phase. The integrated benchmark reads that event's elapsed time as its virtual-store metric. The timer now starts inside the phase, after the session is loaded, as it did before the split. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
Moving the phase timer into `fetch` put the "phase complete" event after the fetch's result was stored but before it was checked, so a rejected lockfile or a failed materialization logged a completed phase. The event follows the `?` again. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
|
Code review by qodo was updated up to the latest commit 717eed3 |
PR Code Suggestions ✨Warning
|
|||||||||
717eed3 to
d08f69d
Compare
|
/agentic_review |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit d08f69d |
Inserting the phase types above `load_custom_fetcher_session` left its doc comment attached to whichever item came first, most recently `MaterializationPlan`. The comment sits on the loader again. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
|
Plan docs describe the wrong function — real: inserting the phase types above Written by an agent (Claude Code, claude-fable-5-1). |
|
Code review by qodo was updated up to the latest commit 66cc01f |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Integrated-Benchmark Report (Linux)Commit: 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
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5710787451,
"stddev": 0.13415972049662428,
"median": 2.5315407488000004,
"user": 1.9713249999999998,
"system": 2.013457,
"min": 2.4283744103,
"max": 2.8585082463000004
},
{
"command": "pacquet@main",
"mean": 2.4776105954,
"stddev": 0.12347654307901677,
"median": 2.4267777023,
"user": 1.7676389999999997,
"system": 1.8510829999999998,
"min": 2.3667875553,
"max": 2.6953201753
},
{
"command": "pnpr@HEAD",
"mean": 1.6118467512999999,
"stddev": 0.11433920848439598,
"median": 1.5852347727999998,
"user": 1.7861299,
"system": 1.9510402,
"min": 1.4348390693,
"max": 1.7739595133000001
},
{
"command": "pnpr@main",
"mean": 1.5148329683,
"stddev": 0.13888874257062683,
"median": 1.4828017853,
"user": 1.7689778,
"system": 1.8249377,
"min": 1.3880181302999999,
"max": 1.8060194003
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3579204159800001,
"stddev": 0.020772433158535695,
"median": 0.36137182938,
"user": 0.37214089999999994,
"system": 0.72047922,
"min": 0.33161988738000003,
"max": 0.38952540338
},
{
"command": "pacquet@main",
"mean": 0.39680410928,
"stddev": 0.044907025929506836,
"median": 0.38953609388,
"user": 0.3983846999999999,
"system": 0.77972792,
"min": 0.31894064638,
"max": 0.45922211438000005
},
{
"command": "pnpr@HEAD",
"mean": 0.39547872538000006,
"stddev": 0.03245297444961489,
"median": 0.38242471588000004,
"user": 0.37385619999999997,
"system": 0.73148082,
"min": 0.36210180838000006,
"max": 0.45446968138000005
},
{
"command": "pnpr@main",
"mean": 0.38748616428000004,
"stddev": 0.03419748443312114,
"median": 0.38055670188,
"user": 0.3654441999999999,
"system": 0.7862760200000001,
"min": 0.34584447638000004,
"max": 0.44067872438000005
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011677145781944441,
"stddev": 0.0021770007082430307,
"median": 0.0112283649,
"user": 0.00662107,
"system": 0.006078100694444446,
"min": 0.0081196054,
"max": 0.020247892400000002
},
{
"command": "pacquet@main",
"mean": 0.01367276765698324,
"stddev": 0.0024724705975748525,
"median": 0.0134605424,
"user": 0.007282258324022343,
"system": 0.007435597765363127,
"min": 0.008358161400000001,
"max": 0.0219987264
},
{
"command": "pnpr@HEAD",
"mean": 0.015527867993749998,
"stddev": 0.004518597165131257,
"median": 0.0145660309,
"user": 0.008516176875000002,
"system": 0.008088421875000003,
"min": 0.0089814604,
"max": 0.0326920024
},
{
"command": "pnpr@main",
"mean": 0.01713836073333333,
"stddev": 0.0042525077622588645,
"median": 0.0165854484,
"user": 0.009592642857142855,
"system": 0.008633595238095237,
"min": 0.0107324354,
"max": 0.029227565400000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.015518218967941174,
"stddev": 0.002007439297267756,
"median": 0.015385715240000002,
"user": 0.007980185000000002,
"system": 0.008380124999999999,
"min": 0.011319363740000001,
"max": 0.022978821740000002
},
{
"command": "pacquet@main",
"mean": 0.01580252229555556,
"stddev": 0.0019535679669545974,
"median": 0.015646930240000002,
"user": 0.00876660861111111,
"system": 0.007891180555555558,
"min": 0.01127511074,
"max": 0.022309676740000003
},
{
"command": "pnpr@HEAD",
"mean": 0.016176999555642467,
"stddev": 0.002275917454767523,
"median": 0.01590050574,
"user": 0.00866973877094972,
"system": 0.008335097765363127,
"min": 0.01162815174,
"max": 0.025436091740000003
},
{
"command": "pnpr@main",
"mean": 0.015160526079622637,
"stddev": 0.0020192099083665123,
"median": 0.01495815774,
"user": 0.008773201509433962,
"system": 0.007248405660377359,
"min": 0.01138451574,
"max": 0.021947217740000004
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.12077256566,
"stddev": 0.15526520003205974,
"median": 3.08980614066,
"user": 3.28536426,
"system": 2.6242286200000002,
"min": 2.93147146266,
"max": 3.37865179166
},
{
"command": "pacquet@main",
"mean": 2.93472371206,
"stddev": 0.052217913538490895,
"median": 2.93978788116,
"user": 2.96503556,
"system": 2.4030028199999993,
"min": 2.85631273666,
"max": 3.03355972966
},
{
"command": "pnpr@HEAD",
"mean": 1.62833256986,
"stddev": 0.07557797861517897,
"median": 1.60926671166,
"user": 1.6057930599999999,
"system": 1.77823012,
"min": 1.53687283466,
"max": 1.77673140566
},
{
"command": "pnpr@main",
"mean": 1.6072376678600002,
"stddev": 0.14528857580486068,
"median": 1.58226775366,
"user": 1.39679576,
"system": 1.5584562200000003,
"min": 1.44206844666,
"max": 1.84303738466
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.43902489859999994,
"stddev": 0.04852982889036776,
"median": 0.43117159790000004,
"user": 0.66415626,
"system": 0.90457968,
"min": 0.39508884340000006,
"max": 0.5590213734
},
{
"command": "pacquet@main",
"mean": 0.44260419250000005,
"stddev": 0.03754446146446538,
"median": 0.43264245590000006,
"user": 0.66062736,
"system": 0.97192808,
"min": 0.40229113140000006,
"max": 0.5083319934
},
{
"command": "pnpr@HEAD",
"mean": 0.3405711278,
"stddev": 0.03064838265233422,
"median": 0.3420898574000001,
"user": 0.25065076000000003,
"system": 0.60569038,
"min": 0.29762826340000004,
"max": 0.37718992340000007
},
{
"command": "pnpr@main",
"mean": 0.33751373380000005,
"stddev": 0.0243560469687406,
"median": 0.33612023090000004,
"user": 0.25630565999999994,
"system": 0.6069102799999999,
"min": 0.30375960440000005,
"max": 0.36742767440000007
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.67800690234,
"stddev": 0.031853446695153456,
"median": 1.6796577252399998,
"user": 1.0850149999999998,
"system": 1.06235544,
"min": 1.6078886312399998,
"max": 1.7377764082399998
},
{
"command": "pacquet@main",
"mean": 1.67390924274,
"stddev": 0.09682965947735064,
"median": 1.64571251924,
"user": 1.0438064,
"system": 1.05170474,
"min": 1.59714181924,
"max": 1.92902208024
},
{
"command": "pnpr@HEAD",
"mean": 0.30720014834000003,
"stddev": 0.014334931935899296,
"median": 0.30620318124,
"user": 0.24976959999999998,
"system": 0.54170914,
"min": 0.28411620024,
"max": 0.33641366024
},
{
"command": "pnpr@main",
"mean": 0.30261053004000005,
"stddev": 0.01680165206898092,
"median": 0.30059353524000004,
"user": 0.2219966,
"system": 0.55820744,
"min": 0.28191357924000005,
"max": 0.33244746924
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.21949254536461546,
"stddev": 0.01063461930405219,
"median": 0.22160378998000002,
"user": 0.22385189692307694,
"system": 0.08447195076923077,
"min": 0.19854711398000002,
"max": 0.23717593698000003
},
{
"command": "pacquet@main",
"mean": 0.2142258326466667,
"stddev": 0.01979445772993193,
"median": 0.20826546248000002,
"user": 0.21085815333333333,
"system": 0.07261355333333333,
"min": 0.19280653798000003,
"max": 0.24893751698000002
},
{
"command": "pnpr@HEAD",
"mean": 0.1000156633248276,
"stddev": 0.0035451858798510255,
"median": 0.10105479698,
"user": 0.04166706137931034,
"system": 0.015559409655172418,
"min": 0.09141956398,
"max": 0.10569936798
},
{
"command": "pnpr@main",
"mean": 0.11810781523,
"stddev": 0.01496649892589409,
"median": 0.11483346498,
"user": 0.05096439142857143,
"system": 0.02327357714285715,
"min": 0.09961241098,
"max": 0.15934577598000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8938941805222222,
"stddev": 0.2107722518336349,
"median": 1.0207244863,
"user": 0.9090657022222222,
"system": 0.22751499333333333,
"min": 0.5141549273,
"max": 1.0762235813
},
{
"command": "pacquet@main",
"mean": 0.9974841174111112,
"stddev": 0.18257501390537895,
"median": 1.0349692033,
"user": 1.0229752577777775,
"system": 0.24260421555555556,
"min": 0.5761790313,
"max": 1.2267387693
},
{
"command": "pnpm@HEAD",
"mean": 6.471649640855556,
"stddev": 2.3247181384721634,
"median": 5.674001369300001,
"user": 9.786528368888888,
"system": 0.5378532155555554,
"min": 4.2902144283000005,
"max": 11.8419444543
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.775145066959999,
"stddev": 0.1973935369879696,
"median": 4.74850759686,
"user": 2.22306342,
"system": 2.0995260399999998,
"min": 4.5324965513599995,
"max": 5.01888384136
},
{
"command": "pacquet@main",
"mean": 4.7711079735599995,
"stddev": 0.19780439090983995,
"median": 4.75940284036,
"user": 2.26925852,
"system": 2.1881435399999996,
"min": 4.52663826136,
"max": 5.10442849936
},
{
"command": "pnpr@HEAD",
"mean": 3.7671886458600006,
"stddev": 0.07916787129751512,
"median": 3.75048580686,
"user": 2.2546101199999997,
"system": 2.32968544,
"min": 3.63176130136,
"max": 3.90028651636
},
{
"command": "pnpr@main",
"mean": 3.6592486264599997,
"stddev": 0.13517116365043344,
"median": 3.64567347886,
"user": 2.0127883199999994,
"system": 1.9500865399999998,
"min": 3.4905407083599997,
"max": 3.97016337236
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame 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.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19887817379818182,
"stddev": 0.01775934977382055,
"median": 0.19612527898,
"user": 0.27081678181818186,
"system": 0.22763717454545454,
"min": 0.16763281998000001,
"max": 0.22958352998
},
{
"command": "pacquet@main",
"mean": 0.1769244362657143,
"stddev": 0.016648271627747815,
"median": 0.17086810298,
"user": 0.2441055285714286,
"system": 0.20276764857142854,
"min": 0.16010436898000002,
"max": 0.22489660898000002
},
{
"command": "pnpr@HEAD",
"mean": 0.19060273444153847,
"stddev": 0.012045082376995406,
"median": 0.19143887798,
"user": 0.24586490769230773,
"system": 0.18852872,
"min": 0.16989369998,
"max": 0.21423317898000002
},
{
"command": "pnpr@main",
"mean": 0.2040620864085714,
"stddev": 0.022398408839348027,
"median": 0.19924489598,
"user": 0.25226859999999995,
"system": 0.20494043428571432,
"min": 0.17348126798000002,
"max": 0.25090536998
}
]
} |
|
Holding this PR: the integrated benchmark's Written by an agent (Claude Code, claude-fable-5-1). |
|
Bisect result: the GVS hot-restore slowdown does not reproduce, so the hold is lifted. Three probe branches ran the integrated benchmark through
Runs 34386887050, 34386889954, 34386893490 (the only failing step is the Bencher upload, which has no PR to attach to). The three commits after Written by an agent (Claude Code, claude-fable-5-1). |
…es (pnpm#14739) Restructure InstallFrozenLockfile::run as a pipeline of &self phases — plan_materialization, settle_skip_set, fetch, link, build — each returning one struct the next consumes whole, where run alone bound 77 names. The plan borrows the allow-builds policy rather than owning it: the directory-clone cache keeps a reference to the policy, so the two cannot share a struct. Every phase returns an explicit Send future capturing only its Copy inputs, because a future holding &self would not be Send (the verification override is a boxed future without Sync). The owned inputs run consumes are taken off self before the phases borrow it. Hand each phase the install's borrowed inputs as one Copy value, FrozenInputs, and keep each phase's output whole for the next; run and every phase bind at most twelve names. Drop the DependencyGroupList type parameter: the one caller hands a Vec and run collected the iterator into another Vec on entry. Related to pnpm#14562.
Summary
Stacked on #14737. Related to #14562.
Turns
InstallFrozenLockfile::runfrom one 470-line body into a pipeline of named phases, each a&selfmethod that returns one struct the next phase consumes whole:runbound 77 distinct names; it and every phase now sit under the 12-name cap, soinstall_frozen_lockfile.rshas notoo_many_local_bindingssite left. Two things made that affordable: the install context from the parent PR (a phase reads the layout, the policies and the linker off&ctxinstead of threading them), andFrozenInputs, theCopyview of the install's borrowed inputs a phase captures as one value — a future holding&selfwould not beSend, so the phases cannot simply borrowself.Two things the borrow checker decided, recorded in the commit messages:
runowns it and the plan borrows it.async fnholding&selfis notSend, because the verification override is a boxed future withoutSync. Each phase is a plainfnreturning an explicitSendfuture that captures only itsCopyinputs.Also drops the
DependencyGroupListtype parameter fromInstallFrozenLockfile: its one caller passes aVec, andruncollected the iterator into anotherVecon entry. A slice borrow removes the parameter and the copy.No user-visible behavior changes; no changeset. Nothing is cloned or allocated that was not before: the phase input and output structs are borrows and moves of values
runalready held.The parent PR's benchmark rows that looked slow (
cold_store_many_medium_tarballsat 1.14–1.19) exercisepnpm-tarball, which neither PR touches; across three samples the row landed at 1.14, 1.01 and 0.92.Squash Commit Body
Checklist
already linked to it solves it.
Written by an agent (Claude Code, claude-fable-5-1).
🤖 Generated with Claude Code
https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
Summary by CodeRabbit