warm-up: VICTORY_WARM_SECONDS stops the translation but not the reading, so the run goes on after it says it stopped #293
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#293
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@itsonewi on GitHub · 2026-11-26 19:16 UTC · original
What happens
VICTORY_WARM_SECONDS=<n>is documented atapps/victory/src/translate.rs:176-177as "stop taking new shaders after n seconds (what is done stays in the cache; the next warm-up goes on from there)", and it is honoured inside the per-file worker:breakends that worker's loop, and nothing above it looks at the limit again. The enclosing walk keeps going for every remaining file of every root:So after the limit the process still reads every remaining file whole (up to
MAX_FILE= 2 GiB each,apps/victory/src/shader.rs:15), scans each buffer for containers, and starts a thread per file that immediately breaks. Only when the walk is finished does it print the summary, with "(stopped at the time limit)" (:229).Why it matters
The point of the limit is to bound the work in a warm-up that can run for tens of minutes over a game install. A limit set for, say, a 5-minute slot still leaves the tool reading every remaining gigabyte of the package before it exits — on a large install that is minutes of disk I/O after it did its last translation, with nothing printed in between, and
counts[3](the "stopped" flag) grows once per file rather than once per stop.Suggested fix
Check the limit at the top of the outer loop (or with an
AtomicBoolthe workers set, tested beforefs::read), and leave the walk as soon as it has passed — the summary then follows the last translation instead of the last file.AI use
Found by reading
apps/victory/src/translate.rs(warm) andapps/victory/src/shader.rsforMAX_FILE. Nothing was built or run.github-bot referenced this issue2026-11-26 19:49:17 +00:00