Repository navigation
perf(tier2): read each target's ninja graph once in the ported-object proof (#3046) - #3049
Merged
Merged
Conversation
… proof (#3046, RED) RED: ninja ran 160 times for 80 queries over 2 targets (want 2).
…t proof (#3046, GREEN) The proof loaded the whole ninja graph up to four times and walked the build tree once per ported object (176 objects, 59 s of the merge queue's Tier 2 build in run 41034283809). Read each target's inputs, unity groups and Unity includes once into a fresh temp dir and grep those.
zackees
commented
Oct 30, 2026
zackees
left a comment
Member
Author
There was a problem hiding this comment.
Coordinator review: LGTM; keeping this one over #3050, which fixed the same issue (#3046) in parallel.
- It is the smaller change (+21/-7 in
validate.sh), and the checks stay the same lines: the direct-objectgrep -qF, the unity group loop and the Unity-include match. Each target'sninja -t inputs, group list and Unity includes are now read once into a temp dir. - RED → GREEN:
ci/test_tier2_ported_proof.pycountsninjacalls with a fake (160 → 2), and the answers test (direct, group, Unity, absent, other target) passes on both sides of the change. - Nit:
proof_diris never removed. The container is thrown away, so it does no harm, but atrap 'rm -rf "$proof_dir"' EXITwould tidy up local runs.
Please post the proof phase's time from this PR's Tier 2 log, against the 59 s baseline. Queue on green.
Member
Author
|
Measured on the PR run 41039631881, Tier 2 build job: the ported-object proof (IDENTICAL -> decklink imports) took 17 s, down from 59 s in merge-group run 41034283809. That's 42 s off the Tier 2 critical path. The 'Build Tier 2' step went from 239 s to 173 s, but part of that is the 99.5 % vs 89.2 % zccache hit rate. CI Gate green; queued. |
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.
Refs #3046
The ported-object proof in
rust/tools/linux-validate/validate.shreloaded the ninja graph up to four times per object and walked the build tree once per object. With 176 objects that cost 59 s of the 239 s "Build Tier 2" step, which sits on the merge-queue critical path (run 41034283809). Now each target's inputs, unity groups and Unity includes are read once into a fresh temp dir. The checks themselves are unchanged.test(tier2): ...):ci/test_tier2_ported_proof.pyruns the script's owncompileswith a counting fakeninja. It fails with "ninja ran 160 times" (want 2). The answers test (direct object, unity group, Unity batch, absent, other target) already passed before the fix.perf(tier2): ...): both tests pass, 4.5 s -> 1.9 s locally.Before: proof phase 59 s (IDENTICAL -> decklink imports). After: will be measured on this PR's Tier 2 build log.
Tiers: CI-only change, no Rust/C behavior.
./lint: green except the known localtest_check_changes.py"git: command not found".