build(profile): compile non-kernel workspace crates at dev opt-level 0 - #3087
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
tracedecay-*workspace crate at devopt-level = 0(40 crates), mirroring the existingtracedecay-contracts/tracedecay-daemon-protocolprecedent.[profile.perf.package.*] opt-level = 1mirrors soperf(which inherits dev overrides) keeps every crate at its previous effective level.cargo build -p tracedecay-clion 8 cores: 461s → 345s wall (−25%), workspace CPU 2156s → 1178s (−45%). One timed run each.Motivation
A
--timingscritical-path audit (walkingunblocked_units/unblocked_rmeta_unitsbackward from the last unit) shows the wall clock is a serial chain of workspace crates whose cost is ~85% LLVM codegen at devopt-level = 1:Frontend time is small (5-29s per crate); codegen is 33-96s.
tracedecay(the root crate) is the slowest gating crate near the tail (98s) because it depends on all 64 workspace crates and can only start once every rmeta is ready;tracedecay-application(158s) is the slowest overall crate but finishes in parallel and does not gate.Measured: dev
opt-level = 0on the non-kernel crates removes ~116s of wall time. The kernel crates that are perf-pinned (code-index,code-index-runtime,domain,graph-db,runtime-core,rusqlite-runtime,store,code-extraction,grafeo-*) keep devopt-level = 1, so localcargo teststill runs optimized engine code.For comparison, dropping the kernels to
opt-level = 0too reaches 257s wall (−44%), at the cost of running all engine code unoptimized in local dev/test builds, left out of this PR.Changes
Cargo.toml:[profile.dev.package.*] opt-level = 0for 40 non-kernel workspace crates plus[profile.perf.package.*] opt-level = 1mirrors.Test plan
cargo build -p tracedecay-clipasses and produces a working binary (timed run above)cargo nextest run --workspace --no-fail-fastpasses (CI)cargo clippyhas no new warnings (no code changes)Checklist
CHANGELOG.mdupdated, N/A, build profile only.envfiles includedLink to Devin session: https://app.devin.ai/sessions/389efda907324a53bdd07ef9f4f29802
Open in Devin Desktop: https://app.devin.ai/desktop/session/389efda907324a53bdd07ef9f4f29802?variant=devin
Requested by: @ScriptedAlchemy
Link to Devin session: https://app.devin.ai/sessions/d1c43c1ea5264a0e9398d1b722b54447
Open in Devin Desktop: https://app.devin.ai/desktop/session/d1c43c1ea5264a0e9398d1b722b54447?variant=devin