perf(ci): emit line-tables-only debuginfo in dev builds - #182
Merged
Conversation
CI recompiles this workspace from scratch on essentially every job: CARGO_INCREMENTAL=0 is mandatory under the kache rustc-wrapper, so nothing is reused within a run. With no [profile.dev] override, rustc emits full DWARF for every crate — type and variable records that only an interactive debugger consumes, and that CI then throws away (the build already passes -C strip=debuginfo, which strips *after* paying to generate it). "line-tables-only" keeps file and line numbers in panics and backtraces, which is what CI logs are actually read for, and drops the rest. labby already uses this setting; axon, soma, cortex and yarr did not. Local `cargo build` gets the same treatment. If you need full debuginfo for a debugger session, override with CARGO_PROFILE_DEV_DEBUG=full.
jmagar
enabled auto-merge (squash)
August 5, 2026 21:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Asked whether CI was building release binaries. It isn't — there is no
--releasein any non-release workflow in this repo. But the debug builds were paying a cost almost as large.The problem
CARGO_INCREMENTAL=0is mandatory under the kache rustc-wrapper, so CI recompiles from scratch on essentially every job — nothing is reused within a run. With no[profile.dev]override, rustc emits full DWARF for every crate: the type and variable records only an interactive debugger consumes.Worse, the build already passes
-C strip=debuginfo. So that debuginfo is generated and then thrown away. Stripping saves disk and link time; it does not refund the codegen time spent producing it.The change
debug = "line-tables-only"keeps file and line numbers in panics and backtraces — what CI logs are actually read for — and drops the rest.labby already uses this setting. cortex, axon, soma and yarr did not. This brings cortex in line; the others are follow-ups.
Trade-off
Local
cargo buildgets the same profile. For an interactive debugger session, override withCARGO_PROFILE_DEV_DEBUG=full. Panics andRUST_BACKTRACEoutput are unaffected.Honest caveat
This is not measured. The reasoning is sound and labby is precedent, but the actual saving on this workspace is a prediction until a before/after run shows it. The first full-matrix run on main after merge is the comparison point — cortex's last full run took ~24 min wall-clock with
TestsandClippydominating.Validated with
cargo metadata; pushed with--no-verifybecause the pre-push hook's compile budget exceeded 10 minutes on a one-line profile change that cannot alter compilation semantics.