From e24a9f80054f9e4961cafb8d553c1ba2c1de375a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 22 Aug 2026 14:16:48 +0000 Subject: [PATCH] build: debug info off by default for dev and test builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Measured across this fleet on 2026-08-22: 22 GB / ~40 min with debug info vs 4.4 GB / ~10 min without, on the same tree. That was being carried as five `CARGO_PROFILE_*` environment variables every session had to know and remember, so a fresh clone, a CI runner, or a session that forgot all got the expensive build. `[profile.test]` inherits from `dev`, so this one entry covers `cargo build` and `cargo test` alike. lance-graph set the same default in its own manifest (#962); MedCare-rs followed today; this closes the same gap here. Verified it reaches the compiler rather than trusting manifest semantics: with no `CARGO_PROFILE_*` variables set, the rustc invocation carries `-C strip=debuginfo` and no `-C debuginfo=2`. Given up: line numbers in panic backtraces. `debug = "line-tables-only"` restores them at a fraction of full debug info when a debugging session needs them — a deliberate temporary edit, not a reason to keep the default expensive. --- Cargo.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ef1bdcb5..816c05a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -474,3 +474,19 @@ rustdoc-args = ["--cfg", "docsrs"] # the patch is exercised by `cargo test -p encryption` and the full workspace. [patch.crates-io] chacha20 = { path = "vendor/chacha20" } + +# Debug info OFF for dev and test builds — the single biggest lever on build +# cost. Measured across this fleet 2026-08-22: 22 GB / ~40 min with debug info +# vs 4.4 GB / ~10 min without, on the same tree. `[profile.test]` inherits from +# `dev`, so this one entry covers `cargo build` and `cargo test` alike. +# +# It belongs in the manifest rather than in each session's environment: carried +# as `CARGO_PROFILE_*` env vars it only helps a session that remembers, and a +# fresh clone or a CI runner gets the expensive build. lance-graph (#962) and +# MedCare-rs already set this default. +# +# Given up: line numbers in panic backtraces. `debug = "line-tables-only"` +# restores them cheaply when a debugging session needs them — a deliberate +# temporary edit, not a reason to keep the default expensive. +[profile.dev] +debug = 0