Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance enhancement for cargo clean #10552

Open
weihanglo opened this issue Apr 10, 2022 · 1 comment
Open

Performance enhancement for cargo clean #10552

weihanglo opened this issue Apr 10, 2022 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-clean Performance Gotta go fast! S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@weihanglo
Copy link
Member

weihanglo commented Apr 10, 2022

Problem

Spinned out from #10236 (comment)

#10236 introduces a progress bar for cargo clean, which has a slight performance hit (0-10%). There are still some possibilities we can explore in this area to enhance its performance.

Proposed Solution

Some directions (and they might be entangled with each other)

  • Parallelize the file removing process.
  • The progress bar ticks too often, and might hurt the performance over a slow network connection.
  • Fall back to non progress bar clean behavior when with --quiet flag on.

Notes

Unless this affects people a lot, I feel like it is not a high-priority task. Anyone interested in it should discuss with the cargo team first, though due to the limited review bandwidth, the team might not respond instantly.

@weihanglo weihanglo added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-clean labels Apr 10, 2022
@ilyapopov
Copy link

ilyapopov commented Jul 25, 2022

For historical precedent: in 2016 npm had an issue where progress bar was slowing down npm install in some cases by a factor of 2.

npm/npm#11283

@weihanglo weihanglo added Performance Gotta go fast! S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-clean Performance Gotta go fast! S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

2 participants