perf: copy big title copies in pieces on the kept threads (VICTORY_WIDE_COPY, off by default) #500
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/500"
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?
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T13:56:14Z.
What
copy_mappedmoves each per-frame title copy (64-76 MB) on a single thread. WithVICTORY_WIDE_COPY=1, a copy of 8 MiB or more is cut into 2 MiB pieces and run through the kept threads ofshadow::wide_run. Each piece goes throughcopy_mappedunchanged, so the title-destination guards still apply per piece. Off by default (A/B switch), so default behaviour is unchanged.The idea comes from fever308's parallel copy work in JMAN730/victory (
b975c652). It is not ported: this is a smaller version written against ourcopy_mapped.THIRD_PARTY.mdgets a row for JMAN730/victory, and the commit carriesCo-authored-byfor fever308.Measurement
Full HD 1920x1080, Series X profile, RTX 4070 SUPER, warm cache, warm-up launch discarded, window 60-170 s, median fps derived from frame times, 3 alternating pairs:
+12 % median, and "on" was ahead in all 3 pairs.
1 % lows (110 samples, crude): off 2.8 / 11.9 / 4.5, on 7.7 / 8.5 / 8.1.
Measured on the maintainer's machine; spread between repeats is high, to confirm.
Test plan
cargo test --release -p victory-gpu piece_copy(2 passed)cargo xtask policyfromthird_party/victory(295 files ok)VICTORY_WIDE_COPY=1vs unset)🤖 Generated with Claude Code
Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T13:56:22Z.
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
We couldn’t complete this review. Comment
@codex reviewto try again.c9c9a64ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T13:56:24Z.
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
Imported from LooperSalty/AnyXboxX. Originally posted by PeppeBeard on 2026-11-27T16:51:46Z.
Replication datapoint for #500's A/B, different hardware class: RTX 5070 Ti (16 GB), 32 GB RAM, 16 logical CPUs, Windows 11, Series X profile, 1920x1080 windowed, warm pipeline cache, built from main at
a445308.Method note: the env var was set user-level (
setx VICTORY_WIDE_COPY 1) so the switch is confirmed active for the run; the comparison session ran without it (launcher-side overrides — see UX note below). Both sessions are normal play through the open world, not a fixed replay, so scene composition varies between them; treat this as a field measurement, not a strict A/B.Per-frame summaries are from the host meter lines (
INFO victory_gpu::host: N fps, ... ms/frame (... preparing: copies X ms Y MB ...), buckets by draws/frame):Pooling all 3k+ draws: median went from 14.7 to
20 fps (+35%), and the worst 2.5-3 fps valleys during heavy streaming disappeared. Per-frame copy volume in heavy scenes was 90-140 MB; "preparing: copies" sat around 10-15 ms/frame with the switch on, versus 15-33 ms in the off session's heaviest samples. Direction agrees with the 4070 SUPER numbers in the PR description, magnitude larger here (likely because our 16-logical-CPU host benefits more from unserializing the big copies).Two UX observations while verifying, for whatever they're worth:
VICTORY_WIDE_COPYis the only A/B switch I've hit that prints no banner or meter line, so there is no way to confirm from the game log that it took effect. A one-line startup log (like the other switches have) would have saved a debugging session.KEY=VALUE→v == "1"gate downstream). A typo'd value (e.g. a trailing character) fails silently with no warning at launch. Validating the value against the expected0/1or echoing the resolved environment in the launch log would catch this.Happy to rerun a tighter fixed-route pair if that would help.