Preload: the shader step prints its progress against a real total (#1423) #1505

Manually merged
github merged 1 commit from github-bot/gh-1505 into main 2026-11-29 08:21:59 +00:00 AGit
Owner

@⁠oVolkra on GitHub · 2026-11-28 21:00 UTC · original
oVolkra:preload-total → main · +64 −32 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

Fixes #1423.

What changes

precompile now walks the paths first, using metadata only (no reads), to list the candidate files (may_hold_shaders, up to MAX_FILE) and their total size. The progress line, still printed every 1000 shaders, is now:

25000 shaders in the cache, file 812 of 2410 (33 %, 41 % of bytes), 173 s

(made-up numbers). The file number is the file being worked on; the byte percentage counts the files before it. The summary line at the end is unchanged.

Most of the diff is the loop body moving out by one level.

Note for #869

#869 matches the progress line with ^(\d+) shaders in the cache, \d+ s$. That pattern does not match the new line, so whichever lands second needs it updated, for example to ^(\d+) shaders in the cache, .*\d+ s$, tried after the summary line's pattern.

Tested

On 923e38c, Windows:

  • cargo test -p victory --release translate::: 2 passed, including a new test of the line's format.
  • cargo clippy -p victory --release --all-targets: exit 0, no warnings in translate.rs.

Not run against a game install, so the time the extra walk takes is not measured.

I did not run cargo fmt over the file: it also rewrites many lines this change does not touch.

🤖 Generated with Claude Code

**@⁠oVolkra** on GitHub · 2026-11-28 21:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1505) `oVolkra:preload-total` → `main` · +64 −32 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC Fixes #1423. ## What changes `precompile` now walks the paths first, using metadata only (no reads), to list the candidate files (`may_hold_shaders`, up to `MAX_FILE`) and their total size. The progress line, still printed every 1000 shaders, is now: ``` 25000 shaders in the cache, file 812 of 2410 (33 %, 41 % of bytes), 173 s ``` (made-up numbers). The file number is the file being worked on; the byte percentage counts the files before it. The summary line at the end is unchanged. Most of the diff is the loop body moving out by one level. ## Note for #869 #869 matches the progress line with `^(\d+) shaders in the cache, \d+ s$`. That pattern does not match the new line, so whichever lands second needs it updated, for example to `^(\d+) shaders in the cache, .*\d+ s$`, tried after the summary line's pattern. ## Tested On `923e38c`, Windows: - `cargo test -p victory --release translate::`: 2 passed, including a new test of the line's format. - `cargo clippy -p victory --release --all-targets`: exit 0, no warnings in `translate.rs`. Not run against a game install, so the time the extra walk takes is not measured. I did not run `cargo fmt` over the file: it also rewrites many lines this change does not touch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Candidate files and their bytes are counted first, from metadata alone, and
the progress line says which file it is on and how many bytes are behind it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 21:02:43 +00:00
github manually merged commit 80f43d5d17 into main 2026-11-29 08:21:59 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1505
No description provided.