Skip to content

perf(pm): bound concurrent package clones#2853

Open
killagu wants to merge 2 commits into
nextfrom
agent/egg-dev/0dc41f83
Open

perf(pm): bound concurrent package clones#2853
killagu wants to merge 2 commits into
nextfrom
agent/egg-dev/0dc41f83

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented Apr 27, 2026

Summary

  • bound concurrent package clone/hardlink/copy work in utoo-pm cloner
  • reduce warm-link blocking pool and filesystem contention observed in pm-bench

Validation

  • cargo build --profile release-local -p utoo-pm
  • cargo test -p utoo-pm cloner
  • cargo test -p utoo-pm
  • cargo fmt --check
  • cargo clippy -p utoo-pm --all-targets -- -D warnings
  • git diff --check HEAD~1..HEAD

Issue: EGG-20

Copilot AI review requested due to automatic review settings April 27, 2026 22:07
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 introduces a concurrency limit for filesystem clone operations in crates/pm/src/util/cloner.rs by implementing a tokio::sync::Semaphore. The limit is dynamically calculated based on available parallelism to mitigate scheduler churn and filesystem contention. Feedback suggests moving the semaphore acquisition to encompass the remove_dir_all operation, as it is a heavy filesystem task that could contribute to the contention the PR aims to prevent.

Comment thread crates/pm/src/util/cloner.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Bounds concurrent package clone/hardlink/copy work in utoo-pm to reduce blocking-pool scheduling churn and filesystem contention during installs (notably warm-link scenarios).

Changes:

  • Introduced a process-wide semaphore to limit concurrent filesystem clone operations.
  • Added a helper to derive the clone concurrency limit from available parallelism.

Comment thread crates/pm/src/util/cloner.rs Outdated
Comment thread crates/pm/src/util/cloner.rs Outdated
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