Closed
Description
Updated to the latest nightly earlier today, and immediately started noticing a marked compile time slowdown in cargo build
(debug mode) for small projects.
EDIT: Turns out the slowdown is because it's dumping a core to /cores
, I worked this out when my machine became completely full 😁 .
Platform: macOS High Sierra.
NOTE (added by @pnkfelix): it appears you need to turn up a core dump threshold to observe this, e.g. via ulimit -c unlimited
$ rustup update ~/tmp
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: checking for self-updates
stable-x86_64-apple-darwin unchanged - rustc 1.22.1 (05e2e1c41 2017-11-22)
nightly-x86_64-apple-darwin unchanged - rustc 1.24.0-nightly (1956d5535 2017-12-03)
$ cargo new --bin hello_nightly && cd hello_nightly ~/tmp
Created binary (application) `hello_nightly` project
$ time rustup run nightly cargo build ~/tmp/hello_nightly (master*)
Compiling hello_nightly v0.1.0 (file:///Users/gib/tmp/hello_nightly)
Finished dev [unoptimized + debuginfo] target(s) in 3.0 secs
rustup run nightly cargo build 0.32s user 1.17s system 46% cpu 3.229 total
$ touch src/main.rs && time rustup run nightly cargo build ~/tmp/hello_nightly 3s (master*)
Compiling hello_nightly v0.1.0 (file:///Users/gib/tmp/hello_nightly)
Finished dev [unoptimized + debuginfo] target(s) in 2.90 secs
rustup run nightly cargo build 0.33s user 1.07s system 44% cpu 3.133 total
$ cd .. ~/tmp/hello_nightly 3s (master*)
$ cargo new --bin hello_stable && cd hello_stable ~/tmp
Created binary (application) `hello_stable` project
$ time rustup run stable cargo build ~/tmp/hello_stable (master*)
Compiling hello_stable v0.1.0 (file:///Users/gib/tmp/hello_stable)
Finished dev [unoptimized + debuginfo] target(s) in 0.53 secs
rustup run stable cargo build 0.37s user 0.23s system 65% cpu 0.908 total
$ touch src/main.rs && time rustup run stable cargo build ~/tmp/hello_stable 1s (master*)
Compiling hello_stable v0.1.0 (file:///Users/gib/tmp/hello_stable)
Finished dev [unoptimized + debuginfo] target(s) in 0.31 secs
rustup run stable cargo build 0.33s user 0.17s system 92% cpu 0.542 total
Sorry if this is a duplicate, didn't see anything relevant in the issue tracker.