From 0d9fd10ab8ff005ae360616b3d89624c3c352126 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 22 Aug 2026 14:16:50 +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 add68c60..a1cc6a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,3 +95,19 @@ arrow-schema = "58" surrealdb-ast = { git = "https://github.com/AdaWorldAPI/surrealdb", branch = "main" } surrealdb-parser = { git = "https://github.com/AdaWorldAPI/surrealdb", branch = "main" } surrealdb-core = { git = "https://github.com/AdaWorldAPI/surrealdb", branch = "main", default-features = false } + +# 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