perf(pm): reduce install hot path overhead#2846
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates logging levels from debug to trace for several operations and introduces structured logging with counters for binary linking and package cleaning. Additionally, it adds a conditional check to skip binary mirroring. Feedback suggests refining the binary linking logic to ensure counters and success logs accurately reflect whether binaries were actually processed, rather than just checking if the package has binary definitions.
| if !package.bin_files.is_empty() { | ||
| tracing::debug!("Linking binary files for {}", package.name); | ||
| tracing::trace!("Linking binary files for {}", package.name); | ||
| linked_packages += 1; |
There was a problem hiding this comment.
The linked_packages counter is incremented for every package that has a non-empty bin_files list, regardless of whether any of those binaries are actually linked successfully. If all binaries for a package are skipped (e.g., because they don't exist on disk at line 292), the summary log at the end will still count this as a linked package. Consider incrementing this counter only if at least one binary was successfully processed for the package.
| linked_bins += 1; | ||
| } | ||
| tracing::debug!("Linking binary files for {} successfully", package.name); | ||
| tracing::trace!("Linking binary files for {} successfully", package.name); |
There was a problem hiding this comment.
|
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. |
Summary
Verification
Note: full workspace cargo clippy --all-targets -- -D warnings --no-deps is blocked in this environment by missing pkg-config/OpenSSL for unrelated pack dependencies (openssl-sys).