Repository navigation
Conversation
…3046) RED. rust/tools/linux-validate/validate.sh runs `ninja -t inputs <target>` twice per (portable object, target) pair plus a `find` of the build tree, so 176 ported objects load the Ninja graph about 700 times: 59 s of the merge-queue critical path in merge-group run 41034283809. The test drives the proof that replaces it -- rust/tools/linux-validate/ ported_proof.py -- with a counting fake `ninja`, so it asserts the graph is read once per target, not once per object. ported_proof.py does not exist yet: this run fails at load_proof() with FileNotFoundError, which is the missing port.
…proof (#3046) GREEN. `validate.sh`'s proof ran `ninja -C build -t inputs <target>` up to twice per (ported object, target) pair plus a `find` of the build tree: about 700 full Ninja-graph loads and 176 tree walks for 176 objects, 59 s of the Tier 2 merge-queue critical path (merge-group run 41034283809). The loop moves to `rust/tools/linux-validate/ported_proof.py`, which indexes each target's `ninja -t inputs` list, its unity group batches (BUILD.md) and its `<target>.dir/Unity` batches once, then answers every `compiles()` from that index. The three answers, the FAIL text and the exit status are the ones the shell function gave; the obs-nvenc loader twin check (#645) is unchanged. Measured on obs-studio5 against the real `build/` tree: 176 ported objects answered in 0.11 s (two graph loads) where the shell loop took ~0.15 s per object (~26 s for the same list on this host). Equivalence: all 389 sources of libobs' unity groups through both implementations, 0 mismatches, 9 real group hits. Refs #3046
zackees
marked this pull request as ready for review
October 30, 2026 10:21
Member
Author
|
Coordinator: closing as a duplicate of #3049, which fixes #3046 with a smaller change to |
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.
RED commit
d66d55945(test only):ci/test_tier2_ported_proof.pydrives theextracted proof with a counting fake
ninjaand asserts one graph load per targetinstead of per object. It failed at
load_proof()withFileNotFoundError—rust/tools/linux-validate/ported_proof.pydid not exist.GREEN commit
b8a8d44a0: the proof moves torust/tools/linux-validate/ported_proof.py, which indexes each target'sninja -t inputslist, its unity group batches (BUILD.md) and its<target>.dir/Unitybatches once, then answers everycompiles()from thatindex.
validate.shcalls it once for the whole object list instead of twice per(object, target) pair plus a
findof the build tree.The three answers are the ones the shell function gave — a direct object below
<target>.dir, a source included by one of the target's unity group batches, asource included by
<target>.dir/Unity/unity_N_c.c— with the sameFAIL:textand exit status. The obs-nvenc loader twin check (#645) is unchanged.
Measurement
On
obs-studio5against the realbuild/tree (1.5 MBbuild.ninja):Equivalence: all 389 sources of libobs'
build/*.h.cunity groups through bothimplementations — 0 mismatches, 9 real group hits, so the group path was
exercised against real data and not only the fixtures.
Not measured here: the merge-queue win. The 59 s in the issue is merge-group run
41034283809; this checkout has no
libobs-c-referencetarget, so the full prooflanes were not run locally. Expected saving ~55 s of the 239 s Tier 2 build step;
I will measure it on the merge queue afterwards and comment the number.
Tests
ci/test_tier2_ported_proof.py, 8 tests, all green; picked up by./lint'sci/test_*.pysweep.Test cost: new tests longest 0.46 s (the 50-object graph-load count, which spawns
the fake
ninjatwice), peak RSS 23 MB over the module, no own threads.Windows/macOS: pure Python +
ninja -t inputs, no platform code.CI/docs scope: CI-only change (
rust/tools/,ci/), so nodocs/features.mdline (coordination.md §4).
Refs #3046