Make requested pipelines known to take long wait for the quick ones #424
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!424
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-424"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Indy2l on GitHub · 2026-11-28 17:19 UTC · original
Indy2l:perf/requested-slow-pipelines-last→main· +60090 −5430 · 206 files · 662 commits · closed without mergingSummary
A pipeline that a draw requests and that the slow list (
slow-pipelines.txt) knows takes long now goes after the quick requested ones and before the unrequested early ones. Before, every requested pipeline joined one first-come queue, so a quick pipeline the screen needed could wait behind compiles of 30 to 90 s.VICTORY_PIPELINE_SLOW_ASKED=0keeps the old order, and so doesVICTORY_PIPELINE_SLOW=0(no slow list at all). Nothing about how a pipeline is made changes, only when it is made.This matters right after a translator or driver change. The slow list survives that change, but nothing compiled does. On the prologue route about 460 to 520 pipelines are slow on this PC, 1,450 s of compiling together (see #422 and #423).
RTX 3060 12 GB, i5-12400F, 16 GB, Series S,
-Machine 3060(3 workers)One build of
fe7c6e5with this change behind the switch. The cache state before each run was identical, copied from one template: the driver's shader cache files forvictory.exeremoved, and thepipelinesfolder holding only the early list (1,952) and the slow list (519) of an earlier run, which is the state after a translator change. All runs were recorded and compared at one frame every 10 s. Times count from the first world frame.=0)In run 49 the dropped draws fell to the level they keep afterwards, about 290 a frame (the ray-tracing ones), within about 1.5 minutes. Run 47 took about 5 minutes. Between those points the scene in run 49 is recognizable, but its light is not right yet: a glow on faces where light passes are still missing. Run 47 shows black with fragments over the same stretch. Neither matches the console before the slow pipelines exist. This one lets the player see where they are going.
Run 48 is why the slow requested ones are not capped. With one worker held back, it took unrequested early pipelines whenever no quick one was waiting, the slow ones the screen needed waited, and the correct picture came about 4 minutes later. Without a cap, the slow requested ones keep the same order and the same workers as before, so the full picture is not delayed beyond the spread of one pair of runs.
Verification
cargo clippy --locked --workspace --all-targetsand the same with--all-features: clean.cargo test --locked --workspace: no failures (victory-gpulib 528 passed).cargo test --locked --workspace --all-features -- --test-threads=1: no failures (victory-gpulib 595 passed).pipeline::make::tests::requested_pipelines_known_to_take_long_go_after_the_quick_ones: quick requested first, slow requested next in the order asked, unrequested last, and the old order with the switch off.cargo run -p xtask --locked -- policy: 322 files ok.git diff --check: clean.scripts\play.ps1 -Machine 3060 -Console series-s -Windowed -More @{VICTORY_OUTPUT='1920x1080'; VICTORY_UPSCALER='6'; VICTORY_RENDER_SCALE='0.5'}, with the switch set per run. Recordings stay local.Related: #422 (more workers shortens the same wait) and #395 (static samplers in one order, which would keep many of these pipelines between launches and make this matter less after the first).
🤖 Generated with Claude Code
@Kal0s-design on GitHub · 2026-11-29 10:44 UTC · original · reviewed
Read through the queue change and ran it here on Windows (
6713de7, rebased on current main already).The order looks right to me. A slow early pipeline that a draw then asks for is pushed again as REQUESTED and lands in
asked_slow. Its old copy inslowis skipped byunclaimed()since its state is no longer EARLY.asked_slowpops don't setwas_slow, so they don't eat into the slow limit, and that matches what run 48 argues for.asked_slow_onis set insideworkers()before the first worker spawns and beforestart()takes the queue lock, so nothing is pushed while it's still false. The lock order (queue, then the slow list) is the same one the EARLY path already used.cargo test -p victory-gpu --lib: 528 passed, the newrequested_pipelines_known_to_take_long_go_after_the_quick_onesincluded.cargo clippy -p victory-gpu --all-targets -D warnings: clean.One small thing for the doc comment:
VICTORY_PIPELINE_SLOW=0now turns this off too, because the sameLIMIT_SLOWcheck gates it. That's probably what you want, but the comment only mentionsVICTORY_PIPELINE_SLOW_ASKED=0.AI-assisted: yes
@Indy2l on GitHub · 2026-11-29 11:29 UTC · original
Thanks for the review and the run. You're right, the
LIMIT_SLOWcheck controls both paths, and that's intended: with no slow list, nothing is known to take long. The doc comment now says so (39b70e9).@TaynanGT on GitHub · 2026-11-29 11:37 UTC · original
Thanks for clarifying the empty slow-list behavior and updating the comment in
39b70e9. Please retain coverage for both paths when the list is absent and when it contains known slow pipelines, so the scheduling change remains independent of the worker-count change.@Indy2l on GitHub · 2026-11-29 17:09 UTC · original
Added a test for the list side (
00a9fb8):requested_pipelines_go_after_the_quick_ones_only_when_listed_as_slowgoes throughQueue::push, so the slow list decides. With the order on and nothing listed, requested pipelines keep the order they were asked in. Once one key is listed as slow (library::note_time), it goes after the quick one. The existing test still covers the order itself andVICTORY_PIPELINE_SLOW_ASKED=0.cargo test -p victory-gpu --lib: 529 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.@TaynanGT on GitHub · 2026-11-29 19:02 UTC · original
Thanks, the new Queue::push test covers the missing distinction directly, and the reported 529 passing tests and clean Clippy are helpful. Keep this independent of #422 so the scheduling effect can be evaluated separately.
@TaynanGT on GitHub · 2026-11-30 17:07 UTC · original
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed