Skip to content

Commit af8ba86

Browse files
Use line tables by default for development builds (#21546)
We use `line-tables-only` debug information by default for development and test builds to reduce compilation time while retaining file names and line numbers in backtraces. Optimization levels and debug assertions stay at their development defaults. Reducing debug information improved one captured uv edit/build/test session on an Apple M5 Max with released Ohm 1.98.0-10 and Apple's linker: | Debug information | Median command total | Less time | | --- | ---: | ---: | | Full | 60.75s | — | | Line tables | 48.21s | 20.6% | | None | 45.34s | 25.4% | Each setting ran four times with development and test builds already warm; both reduced-debug settings won all four paired comparisons. These measurements changed the dev/test debug settings through environment overrides. They exclude initial compilation and do not establish gains for other sessions, release builds, or `cargo check`.
1 parent 4b53f66 commit af8ba86

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎Cargo.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,13 @@ use_self = "warn"
382382
# Diagnostics are not actionable: Enable once https://github.com/rust-lang/rust-clippy/issues/13774 is resolved.
383383
large_stack_arrays = "allow"
384384

385+
# Skip type and variable debug information to speed up local builds while retaining
386+
# file names and line numbers for backtraces. This reduced total time by 20% versus
387+
# full debug information in one warm edit/build/test replay on macOS:
388+
# https://github.com/astral-sh/uv/pull/21546
389+
[profile.dev]
390+
debug = "line-tables-only"
391+
385392
[profile.release]
386393
strip = true
387394
lto = "fat"

0 commit comments

Comments
 (0)