-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
A-cachingArea: caching of dependencies, repositories, and build artifactsArea: caching of dependencies, repositories, and build artifactsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
The compilation products of Rust often make the target directory very large
If compressed after compilation, sacrificing some speed can significantly reduce space usage
I hope to have an unstable feature to compress intermediate files and decompress them during use
$ cargo clean
Removed 0 files
$ cargo test -p ide-assists -- -q
Compiling proc-macro2 v1.0.101
...
test result: ok. 2644 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 16.80s
$ du -sh target
3.0G target
$ cargo check -p ide-assists
Checking once_cell v1.21.3
Checking ide-db v0.0.0 (/rust-analyzer/crates/ide-db)
...
Checking ide-assists v0.0.0 (/rust-analyzer/crates/ide-assists)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 02s
$ du -sh target
3.3G target
$ find target -type f -exec gzip {} +
$ du -sh target
883M targetPossible problem
- Compression and decompression have worsened disk IO
- The lifetime of temporarily decompressed files
- May not be aware of compiler requests for intermediate files
- Is it worthwhile to introduce a compression algorithm library into cargo dependencies
- Is the hard link file compressed
@rustbot label +C-feature-request
Metadata
Metadata
Assignees
Labels
A-cachingArea: caching of dependencies, repositories, and build artifactsArea: caching of dependencies, repositories, and build artifactsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.