There are many potential improvements we could make for build times. In the course of evaluating possibilities, we'd like to know how much impact debug information has on build time.
Could people provide feedback on the build time differences in their projects between the default dev profile configuration and with the following added?
[profile.dev]
debug = "line-tables-only"
Ideally, we'd love to get the performance delta for a couple of cases:
A clean cargo build after cargo clean.
After doing cargo build, using touch on your lib.rs or main.rs, and then doing cargo build again.
I tried my Project Euler solutions with 340 binaries (for each I've solved) and 70 dependencies. This is potentially heavy as it involves lots of linking with debuginfo, but they're also pretty small.
With the default profile, cargo build took 23.34s; after touching lib.rs, it took 11.17s.
With "line-tables-only", cargo build took 20.84s; after touching lib.rs, it took 10.00s.
I mean if commenters here posted those tidbits (os, linker, split debuginfo) it could provide more context in case there are discrepancies in their numbers.
I recently ran an informal survey about whether people regularly use a debugger. Of the 89 responses, 18% say they sometimes or always use a debugger while 82% say they rarely or never use a debugger. This seems consistent with what I've observed from talking to rustaceans in person.
I'm definitely supportive of any change to reduce the debug info for a default build.
I think that line number information in backtraces is less important now that it used to be and the reason is #[track_caller]. Generally the line that I care about when I get a backtrace is the line that called unwrap, expect, panic etc and these days that line is reported whether or not you have line debug info. So personally, I set debug=0, but I can understand that's likely a step too far for the default - just changing to line-tables by default would be great.