← Back to context

Comment by Fluorescence

2 days ago

> clean build of a few thousand lines of rust took close to 10 minutes

That doesn't sound likely. I would expect seconds unless something very odd is happing.

Is the example symbolicator?

I can't build the optional "symbolicator-crash" crate because it's not rust but 300k of C++/C pulled from a git submodule that requires dependencies I am not going to install. Your complaint might literally be about C++!

For the rest of the workspace, 60k of rust builds in 60 seconds

- clean debug build on a 6 year old 3900X (which is under load because I am working)

- time includes fetching 650 deps over a poor network and building them (the real line count of the build is likely 100s of thousands or millions of lines of code)

- subsequent release build took 100s

- I use the mold linker which is advised for faster builds

- modern cpus are so much faster than my machine they might not even take 10s

> That doesn't sound likely. I would expect seconds unless something very odd is happing.

And yet here we are.

There are plenty of stories like this floating around of degenerate cases of small projects. Here's [0] one example with numbers and how they solved it. There are enough of these issues that by getting bogged down in "well technically it's not Rust's fault, it's LLVM's single threadedness causing the slowdown here" ignores the point - Rust (very fairly) has a rep for being dog slow to compile even compared to large C++ projects

> For the rest of the workspace, 60k of rust builds in 60 seconds

That's... not fast.

https://github.com/buildkite/agent is 40k lines of go according to cloc, and running `go build` including pulling dependencies takes 40 seconds. Without pulling dependencies it's 2 seconds. _That's_ fast.

[0] https://www.feldera.com/blog/cutting-down-rust-compile-times...