perf(launcher): combine warm_first into one deduplicated warm step #438

Manually merged
github merged 16 commits from github-bot/gh-438 into main 2026-11-27 00:36:21 +00:00 AGit
Owner

@⁠mauroalvare on GitHub · 2026-11-26 18:46 UTC · original
mauroalvare:perf/launcher-gui-single-warm → main · +146 −28 · 3 files · 3 commits · merged 2026-11-26 23:17 UTC

Summary

  • Combines the anyxboxx-launcher warm_first option ("Also preload shaders.rpf and the game DLLs before the game") into the single deduplicated victory warm step instead of running two separate victory warm processes back to back.
  • Includes the precompile inputs (shaders.rpf once, game_scarlett_master.exe, XboxBvhBuilder.dll, amd_fidelityfx_upscaler_xbox.dll) in the smart-warm fingerprint (warm_check, warm_step, stale_after_build, and precompile_steps) so turning warm_first on warms the binaries once and subsequent launches skip warming while the marker matches.

Problem

On base c3cc029, enabling warm_first in crates/anyxboxx-launcher/src/launch.rs had two redundant-work bugs:

  1. When warm.needed was true, play_steps appended both Warming the shader cache (victory warm *.rpf, which already contains shaders.rpf) and Preloading shaders (victory warm shaders.rpf game_scarlett_master.exe XboxBvhBuilder.dll amd_fidelityfx_upscaler_xbox.dll), launching two separate victory.exe processes and scanning shaders.rpf twice.
  2. When warm.needed was false (marker already matched), play_steps still appended Preloading shaders unconditionally on every launch.

Reproduction on base c3cc029

Running the new regression test against base c3cc029 (cargo test -p anyxboxx-launcher warm_first_combines_into_one_deduplicated_warm):

assertion `left == right` failed: warm_first must not run two separate victory warm processes
  left: 2
 right: 1

Verification

All tests ran locally on Windows x64 (Ryzen 7 9700X, RTX 5070 Ti, 32 GB RAM) with synthetic temp fixtures only (no game files):

  • cargo test -p anyxboxx-launcher -> ok. 212 passed; 0 failed; 1 ignored; finished in 0.41s (including launch::tests::warm_first_combines_into_one_deduplicated_warm_and_respects_warm_marker).
  • cargo clippy -p anyxboxx-launcher --all-targets -- -D warnings -> 0 warnings on anyxboxx-launcher.

Checklist

  • No game, console or SDK files added
  • Tests added / updated and passing (cargo test -p anyxboxx-launcher)
  • Lint passing (cargo clippy -p anyxboxx-launcher --all-targets -- -D warnings)

Made with AI assistance (Antigravity).

**@⁠mauroalvare** on GitHub · 2026-11-26 18:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/438) `mauroalvare:perf/launcher-gui-single-warm` → `main` · +146 −28 · 3 files · 3 commits · merged 2026-11-26 23:17 UTC ## Summary - Combines the `anyxboxx-launcher` `warm_first` option (*"Also preload shaders.rpf and the game DLLs before the game"*) into the single deduplicated `victory warm` step instead of running two separate `victory warm` processes back to back. - Includes the precompile inputs (`shaders.rpf` once, `game_scarlett_master.exe`, `XboxBvhBuilder.dll`, `amd_fidelityfx_upscaler_xbox.dll`) in the smart-warm fingerprint (`warm_check`, `warm_step`, `stale_after_build`, and `precompile_steps`) so turning `warm_first` on warms the binaries once and subsequent launches skip warming while the marker matches. ## Problem On base `c3cc029`, enabling `warm_first` in `crates/anyxboxx-launcher/src/launch.rs` had two redundant-work bugs: 1. When `warm.needed` was true, `play_steps` appended both `Warming the shader cache` (`victory warm *.rpf`, which already contains `shaders.rpf`) and `Preloading shaders` (`victory warm shaders.rpf game_scarlett_master.exe XboxBvhBuilder.dll amd_fidelityfx_upscaler_xbox.dll`), launching two separate `victory.exe` processes and scanning `shaders.rpf` twice. 2. When `warm.needed` was false (marker already matched), `play_steps` still appended `Preloading shaders` unconditionally on every launch. ## Reproduction on base `c3cc029` Running the new regression test against base `c3cc029` (`cargo test -p anyxboxx-launcher warm_first_combines_into_one_deduplicated_warm`): ```text assertion `left == right` failed: warm_first must not run two separate victory warm processes left: 2 right: 1 ``` ## Verification All tests ran locally on Windows x64 (Ryzen 7 9700X, RTX 5070 Ti, 32 GB RAM) with synthetic temp fixtures only (no game files): - `cargo test -p anyxboxx-launcher` -> `ok. 212 passed; 0 failed; 1 ignored; finished in 0.41s` (including `launch::tests::warm_first_combines_into_one_deduplicated_warm_and_respects_warm_marker`). - `cargo clippy -p anyxboxx-launcher --all-targets -- -D warnings` -> 0 warnings on `anyxboxx-launcher`. ## Checklist - [x] No game, console or SDK files added - [x] Tests added / updated and passing (`cargo test -p anyxboxx-launcher`) - [x] Lint passing (`cargo clippy -p anyxboxx-launcher --all-targets -- -D warnings`) Made with AI assistance (Antigravity).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:56:34 +00:00
github-bot force-pushed github-bot/gh-438 from a391ce5ef9 to 83bbf0f69e 2026-11-26 19:50:42 +00:00 Compare
github-bot force-pushed github-bot/gh-438 from 83bbf0f69e to eceafd0a86 2026-11-27 00:36:21 +00:00 Compare
github manually merged commit 5a08a334ef into main 2026-11-27 00:36:21 +00:00
Author
Owner

@⁠akimfomin on GitHub · 2026-11-26 23:16 UTC · original

Both warm-state PRs still stack cleanly on the merged Vice-Tay main b6d86cf8226b718d1efd80da1131945840d6820d. I checked #438 at eceafd0 and #434 at dd8400c against that base and against each other. Git found zero conflicts in all three comparisons. The public #438 play path and #434 key fit together at the same marker.

One useful integration control: on the combined tree, warm once with the binary preload enabled, restart in a new launcher process after changing only the display mode, then change a translation switch in a third process. Expect no warm in the second process and exactly one deduplicated warm in the third. The Git comparison ran locally; the combined launcher behavior is still open. PortBridge · AI-assisted comparison.

**@⁠akimfomin** on GitHub · 2026-11-26 23:16 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/438#issuecomment-7205406430) Both warm-state PRs still stack cleanly on the merged Vice-Tay main `b6d86cf8226b718d1efd80da1131945840d6820d`. I checked #438 at `eceafd0` and #434 at `dd8400c` against that base and against each other. Git found zero conflicts in all three comparisons. The public [#438 play path](https://github.com/LooperSalty/AnyXboxX/blob/eceafd0a86d6f44ae0dbb74867f523f0afa7c7b5/crates/anyxboxx-launcher/src/launch.rs#L84-L105) and [#434 key](https://github.com/LooperSalty/AnyXboxX/blob/dd8400c698ec3578b3ba211a62b0a5d0af2ac5a2/crates/anyxboxx-launcher/src/warm_state.rs#L13-L57) fit together at the same marker. One useful integration control: on the combined tree, warm once with the binary preload enabled, restart in a new launcher process after changing only the display mode, then change a translation switch in a third process. Expect no warm in the second process and exactly one deduplicated warm in the third. The Git comparison ran locally; the combined launcher behavior is still open. [PortBridge](https://github.com/akimfomin/PortBridge/issues/98) · AI-assisted comparison.
This discussion has been locked. Commenting is limited to contributors.
No description provided.