Relay thread spends 50-70 ms a frame dropping ~75k retired objects (RTX 5080); dropping them on another thread: 91 -> 65 ms #1349
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#1349
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?
@Ym1r1710 on GitHub · 2026-11-26 17:31 UTC · original
Not sure if this is already known. Posting the numbers in case they help with deciding on
VICTORY_REAPER.Setup: RTX 5080, driver 621.24, 7800X3D, 32 GB. The build is upstream
ffe310ebplus the CGBJ patches, which carry this fork's relay code from a few days ago (VICTORY_RELAY=2). Diag profile,--console series-s. Spot: Jason's balcony after the first mission, same camera every run, measured around world+696.What I saw: a timeline of one frame showed the
victory-relaythread spending ~73 ms of a 128 ms frame insidebury(last), after it had already told the title the list ran. It drops 70-83k objects a frame there, mostly descriptor slot references and host copies. The submitting thread's settles ("title memory read", "lists in the air") were waiting on that, not on the card.I added a counter and moved the drop to a thread of its own. It's the same idea as your
reap()/VICTORY_REAPER: objects are handed over at the same point as before, never earlier.Pictures are the same, and there were no device removals.
The odd part is that the drops themselves are slow, about 0.8 µs each. In one run without the separate thread, Windows got low on RAM (~3 GB free) and the log showed
host memory pressure: limiting texture prefetch and idle upload storage. After that, the same ~75k objects a frame dropped in 1-4 ms, and the frame went down to 56-57 ms. So something on the prefetch/upload side makes those releases contend (a driver lock? the heap?). I haven't found out what yet.VICTORY_REAPERis off by default and the README has no numbers for it, so it may be worth a run on your side. I haven't tried your REAPER itself; mine is a separate patch on an older base.@CarverXI on GitHub · 2026-11-26 17:41 UTC · original
Where did you find the CGBJ patches, I thought that repository was made private.
@Layikon on GitHub · 2026-11-26 17:53 UTC · original
Some guy managed to make a copy for himself—I even saved it. But when I tried running it, all I got was a black screen. https://github.com/DoubleGhosty/cool_fox.git
@Victorywillbeours222 on GitHub · 2026-11-26 18:28 UTC · original
A data point from another tree, in case it helps narrow this down. I ported
VICTORY_REAPERinto Proudnoob4/VIctory-NVIDIAnvidia-hybrid-v2(f53aa2b):bury()hands what it would drop to the reaper thread, plus a frame-log line that times the drops on each side. I ran it with=alt(flipping every 20 s).Machine and run: RTX 5080 16 GB, Ryzen 7 5800X, 32 GB, Windows 11; diagnostics build, Series S at 720p; hands-off in the opening cell; 600 s; 0 errors.
So on that tree a similar number of retired objects costs about 1 ms to drop, and the reaper changes nothing there. That points at what fork main retires, rather than how many objects there are. If your log can split the drop time by kind of object, it would show which kind takes the 50–70 ms.
Numbers and text only. AI-assisted (Claude Code).
@Ym1r1710 on GitHub · 2026-11-26 19:02 UTC · original
Thanks, that matches what I found after splitting the drops by kind. The count was never the problem. On the balcony, of ~73-75k objects dropped a frame:
All of the expensive ones were list scratch chunks, committed upload buffers:
The spare pool sat at its 128 MiB bound the whole run, and it was all 4 MiB chunks.
takeonly matches the exact size, so every small first chunk was made new, and chunks coming back past the bound got freed.The fix is in #1367. With it, the same ~75k drops take 7.5-8 ms a frame, with 0 resources destroyed, and the frame went from 63-84 to 52-56 ms.
My guess for why you see ~1 ms in the opening cell: fewer or smaller lists there, so the spares stay under the bound and nothing gets freed. If your log shows how many scratch chunks get made per frame, that would confirm it.