Help wanted: where does a world frame's CPU time go? #39
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/ThatRecompDev--five-star-recomp#39
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?
@ThatRecompDev on GitHub · 2026-11-25 16:23 UTC · original
the opening cutscene and menus already hold 30 fps, but once the 3D world loads the frame rate drops well below that. before we optimise blindly we need to know where a world frame's CPU time goes.
what would help:
--sample-threadsand the managed profile summary are a start, a proper per-frame timeline (ETW/PIX markers or our own counters) would be betterbackground:
docs/debugging.md(sample lines, profiles),docs/d3d12x-shim.md. related: #35 (GPU side of the mesh shaders).@ThatRecompDev on GitHub · 2026-11-26 11:37 UTC · original
we have an answer for this one now
--cpu-samplesamples the game threads and splits them into game code / our shims / system / blocked, and names the loader method when it's ours.--profile-managedadds allocationswhat it found: the 5 subrender threads were spending ~half their time in two per-draw scans of the write-combined descriptor window, plus CPU waits for a list's previous run and
--watch-hang's stack scans. all three are fixed, our share on the game threads went from ~50% to under 1% and a world frame from ~1.1 s to ~400 ms. the remaining CPU cost is texture refresh and GC, both being worked onclosing, new findings can go in fresh issues