You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(tier2): ported-object proof reloads the ninja graph ~700 times (59 s on the merge-queue critical path) #3046
The Tier 2 Linux build job is on the merge-queue critical path, and 59 s of its 239 s build step goes to the ported-object proof in rust/tools/linux-validate/validate.sh, not to compiling.
Merge-group run 41034283809 (PR #3032, the only Tier 2 merge_group run after #3036):
For each of the 176 ported objects, compiles() runs twice (libobs, libobs-c-reference). Each call runs ninja -C "$build" -t inputs <target> up to twice and a find "$build" over the whole build tree. That adds up to about 700 full ninja-graph loads and 176 tree walks. The inputs of a target don't change during the loop.
Fix
Read each target's ninja -t inputs list and Unity include list once into a fresh temp dir, then grep those files. The proof still checks the same things. Test: ci/test_tier2_ported_proof.py runs the extracted functions with a counting fake ninja.
Expected saving: about 55 s on the Tier 2 critical path (merge queue and PRs that touch libobs).
Claiming: #3046. Plan: 1) RED: ci/test_tier2_ported_proof.py counts ninja calls in the proof. 2) GREEN: cache each target's inputs and Unity list once. One PR today; I'll measure on the merge queue afterwards. This is the only item in this PR; the other merge-queue sinks I measured are under 10 s or are on the dead-end list.
Fixed by #3049. Merge-group run 41042404269: the ported-object proof took 14 s (was 59 s in run 41034283809). The Tier 2 build job took 4m05s (was 5m40s), and CI Gate finished 7m26s after queue start (was 9m16s; part of that is a warmer zccache, 99.5 % vs 89.2 %). Nothing left for this issue. Next candidates: Fast Gate unit tests (251 s) and Tier 2 test shards (~130 s each), now that the Tier 2 path is only slightly longer than Fast Gate.
Activity
zackees commentedon Oct 30, 2026
Claiming: #3046. Plan: 1) RED: ci/test_tier2_ported_proof.py counts ninja calls in the proof. 2) GREEN: cache each target's inputs and Unity list once. One PR today; I'll measure on the merge queue afterwards. This is the only item in this PR; the other merge-queue sinks I measured are under 10 s or are on the dead-end list.
ci(tier2): read each Ninja target's inputs once in the ported-object …
ci(tier2): drop the shell obs-nvenc loop the proof replaced (#3046)
zackees commentedon Oct 30, 2026
Fixed by #3049. Merge-group run 41042404269: the ported-object proof took 14 s (was 59 s in run 41034283809). The Tier 2 build job took 4m05s (was 5m40s), and CI Gate finished 7m26s after queue start (was 9m16s; part of that is a warmer zccache, 99.5 % vs 89.2 %). Nothing left for this issue. Next candidates: Fast Gate unit tests (251 s) and Tier 2 test shards (~130 s each), now that the Tier 2 path is only slightly longer than Fast Gate.
perf(tier2): read each target's ninja graph once in the ported-object…