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

Merged
oVolkra merged 1 commit from upstream-pr/1505 into main 2026-11-29 08:16:56 +00:00
oVolkra commented 2026-11-28 21:00:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by oVolkra on 2026-11-28T21:00:14Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544525504 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1505). Originally posted by [oVolkra](https://github.com/oVolkra) on 2026-11-28T21:00:14Z. --- 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)
Sign in to join this conversation.
No reviewers
No labels
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.

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