4 ms·
cargo and rustc need work: - sccache helps with some parts of builds but rustc needs to be caching a whole lot more for rapid TDD iterations. It shouldn't take
by sacnoradhq 4y ago
cargo and rustc need work:
- sccache helps with some parts of builds but rustc needs to be caching a whole lot more for rapid TDD iterations. It shouldn't take seconds or many minutes to build things. (Invoke "go does it in milliseconds" card.)
- cargo should migrate away from git and sparse protocols. Both are slow because one abuses git and the other fetches each crate metadata as a file using individual requests. It would be faster and simpler to send either a total compressed sqlite database OR a compressed SQL transaction to migrate between versions. N files on disk representing each crate is asking for fs performance problems in the real world on fses people actual use.
- cyann 4y agoI've found the sparse protocol many times faster than git since Rust 1.68 To use the sparse protocol with crates.io, set the environment variable CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse, or edit your .cargo/config.toml file to add: [registries.crates-io] protocol = "sparse" https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargos-sparse-protocol https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargo...