Feedback request: Performance improvements from reducing debug info

Ubuntu-based with Wild as the linker

Smallish build (10MiB binary):

default cold: 22.49s
line-tables cold: 20.78s
debug=0 cold: 19.66s

default warm: 0.24s
line-tables warm: 0.20s
debug=0 warm: 0.18s

Larger build (several binaries around 450MiB each):

default cold: 4m 51s
line-tables cold: 3m 46s
debug=0 cold: 3m 16s

default warm: 4.48s
line-tables warm: 2.28s
debug=0 warm: 1.63s

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.

3 Likes