Reuse the file read buffer for title images #4707

Closed
github-bot wants to merge 2 commits from github-bot/gh-4706 into main AGit
Owner

@⁠topangag on GitHub · 2026-12-01 02:37 UTC · original
topangag:codex/reuse-title-image-read-buffer → main · +33 −12 · 4 files · 2 commits · closed without merging

What it changes

Preparing a title executable or DLL cloned the file-sized buffer after reading it into memory. The owned preparation path patches the original read buffer in place and preserves the original hash and prepared bytes. The executable and DLL loaders use this path and release the buffer after mapping. The slice-based API remains available.

How it was tested

  • On Windows x86_64 with MSVC, all 77 tests passed with cargo test --locked -p victory-loader --lib -j 3. The regression test checks allocation identity, the original hash, and the patched bytes. The tested tree matches this branch.
  • cargo xtask policy --staged passed for the four Rust files. git diff --check passed.
  • The change removes one file-sized allocation per prepared image. In-game frame rate for this isolated change remains unmeasured.

Checked for overlap

  • I searched open pull requests for the same issue and the files this touches. #3074 shares loader files for diagnostics.
**@⁠topangag** on GitHub · 2026-12-01 02:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4706) `topangag:codex/reuse-title-image-read-buffer` → `main` · +33 −12 · 4 files · 2 commits · closed without merging ## What it changes Preparing a title executable or DLL cloned the file-sized buffer after reading it into memory. The owned preparation path patches the original read buffer in place and preserves the original hash and prepared bytes. The executable and DLL loaders use this path and release the buffer after mapping. The slice-based API remains available. ## How it was tested - On Windows x86_64 with MSVC, all 77 tests passed with `cargo test --locked -p victory-loader --lib -j 3`. The regression test checks allocation identity, the original hash, and the patched bytes. The tested tree matches this branch. - `cargo xtask policy --staged` passed for the four Rust files. `git diff --check` passed. - The change removes one file-sized allocation per prepared image. In-game frame rate for this isolated change remains unmeasured. ## Checked for overlap - [x] I searched open pull requests for the same issue and the files this touches. #3074 shares loader files for diagnostics.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 02:41:35 +00:00
github-bot closed this pull request 2026-12-01 03:10:20 +00:00

Pull request closed

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!4707
No description provided.