perf(victory-gpu): the relay retires ~70k kept views per frame one lock at a time (120-360 ms per frame on an 8-core CPU) #607
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 AlphaVIE on 2026-12-01T18:11:52Z.
What I measured
On my machine the world ran at 4-6 fps (Series S profile) to 2-10 fps (Series X), while the card sat mostly idle: 4-30% busy by VIctory's own card clock and
nvidia-smi. The submitting thread waited 120-200 ms per frame for the relay ("settles", title memory read).To find out where the relay's time goes, I split the "read-backs and lists" part of the landing line (local instrumentation, not part of the PR). Nearly all of it was
Detached::release_tables->State::tables_done->HostHeap::release->retire_resource:Every kept view goes through
retire_resourceon its own, and each call takes theRETIREDshard lock that the recording threads use as well.Proposed change (PR to follow)
Give a list's dynamic slots back in one pass (
release_dynamic_many/HostHeap::release_many), and retire the kept views of that pass with one stamp, one lock and one ordered merge (retire_resources, using the existingmerge_retired_batch). Retirement still waits for the same stamp, so nothing is dropped earlier than before.Measured with the change (same machine, Series S, world, release build, how: VIctory log lines plus the local split):
Machine: Ryzen 7 5700X (8 cores / 16 threads), 32 GB RAM, RTX 5060 Ti 16 GB (PCIe 4.0 x8), Windows 11, Xbox Series build 1.0.2.1,
anyxboxx runwith the tuned settings.Note:
VICTORY_BATCH_RETIRE=1(the existing opt-in batching for recording threads) gave a black picture at a constant 3.6 fps in one run here, so I did not build on it.This work was done with AI assistance (Claude Code).