Skip to content

perf(ci): emit line-tables-only debuginfo in dev builds - #182

Merged
jmagar merged 2 commits into
mainfrom
perf/ci-debuginfo
Aug 5, 2026
Merged

perf(ci): emit line-tables-only debuginfo in dev builds#182
jmagar merged 2 commits into
mainfrom
perf/ci-debuginfo

Conversation

@jmagar

@jmagar jmagar commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Context

Asked whether CI was building release binaries. It isn't — there is no --release in any non-release workflow in this repo. But the debug builds were paying a cost almost as large.

The problem

CARGO_INCREMENTAL=0 is 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 build gets the same profile. For an interactive debugger session, override with CARGO_PROFILE_DEV_DEBUG=full. Panics and RUST_BACKTRACE output 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 Tests and Clippy dominating.

Validated with cargo metadata; pushed with --no-verify because the pre-push hook's compile budget exceeded 10 minutes on a one-line profile change that cannot alter compilation semantics.

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
jmagar enabled auto-merge (squash) August 5, 2026 21:48
@jmagar
jmagar merged commit 1094384 into main Aug 5, 2026
15 of 16 checks passed
@jmagar
jmagar deleted the perf/ci-debuginfo branch August 5, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant