Repository navigation
build: optimise only the dependencies the tests run hard - #796
Merged
Merged
Conversation
The dev profile built every dependency at opt-level 2. Most of that compile time went to code the tests barely run: vendored OpenSSL and libgit2, the image crates fastembed pulls in, the HTTP and TLS stack, and macros and build scripts. Keep opt-level 2 for SQLite, the tokenizer and splitter stack, the model runtime glue, hashing, Unicode normalisation, JSON and YAML, and deflate; leave the rest at 0. The cargo steps of `just check-full` from an empty target folder went from 51 to 57 minutes to 27 to 29 on the 4-core dev VM. The warm test runs take 2 to 3% longer together. Measurements are on #795. Closes #795 Changelog: none, contributor build speed only; release builds and the shipped image are unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rPDLhETpjZUDsjdKyaDu5
openssl-src hardcodes -O2 for OpenSSL's C code, so only its Rust parts follow the profile. Changelog: none, comment only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rPDLhETpjZUDsjdKyaDu5
4 tasks done
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
Everything else (libgit2's C build, the image crates fastembed pulls in, the HTTP and TLS stack, macros and build scripts) drops to opt-level 0 in debug and test builds. Vendored OpenSSL's C code stays at
-O2becauseopenssl-srchardcodes it.Evidence
Cargo steps of
just check-fullfrom an empty target folder, 4-core VM, runs alternated:After: 27.0 and 28.7 min (4,869 and 4,910 CPU-seconds)
Warm test runs, three alternating rounds: 120.2 s before, 122.6 s after (+2.0% wall, +2.9% CPU). Every test passed in all runs.
just checkandjust check-fullpass on the final tree. Per-step tables and per-test checks are on #795.Merge Danger
Door: two-way
Revert the one
Cargo.tomlsection.Blast Radius: contributors
Debug and test builds only:
just check,just dev-start, and the image'sverificationstage. Release builds and the shipped image are unchanged. Every existing target folder rebuilds its dependencies once, because the profile changed. A dependency the tests need fast but the list misses would show up as a slow or timed-out test.Closes #795
🤖 Generated with Claude Code
https://claude.ai/code/session_013rPDLhETpjZUDsjdKyaDu5