Skip to content

perf(pm): fast path npm package clone source#2848

Closed
killagu wants to merge 1 commit into
nextfrom
agent/egg-dev/a71b95ca
Closed

perf(pm): fast path npm package clone source#2848
killagu wants to merge 1 commit into
nextfrom
agent/egg-dev/a71b95ca

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented Apr 27, 2026

Summary

  • Fast-path npm tarball cache extraction by checking the standard package/ directory before scanning cache entries.
  • Keep the existing fallback for non-standard extracted layouts.
  • Add regression coverage for preferring package/ when present.

Verification

  • cargo fmt --all
  • cargo test -p utoo-pm
  • cargo clippy -p utoo-pm --all-targets -- -D warnings
  • BENCH_RUNS=1 PM_LIST=utoo PROJECT=ant-design bench/pm-bench-phases.sh (baseline and patched; warm link improved from 1.14s to 0.76s in local one-run data)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the find_real_src function in crates/pm/src/util/cloner.rs to prioritize a subdirectory named "package" if it exists within the source path. A new unit test, test_find_real_src_prefers_package_dir, was also added to verify this behavior. I have no feedback to provide as there were no review comments.

@elrrrrrrr
Copy link
Copy Markdown
Contributor

Closing as stale: this draft is a one-off agent experiment from 2026-04-27 with no follow-up, and overlaps with sibling PRs exploring the same optimization. Reopen if revisited.

@elrrrrrrr elrrrrrrr closed this May 25, 2026
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.

2 participants