Check a heap page's descriptor records under one lock #7
No reviewers
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/TaynanGT--Vice-Tay--gone-20261126!7
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/7/head"
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?
@TaynanGT on GitHub · 2026-11-25 08:59 UTC · original
TaynanGT:claude/heap-sync-cost→local/fxceless-render· +102 −6 · 3 files · 5 commits · closed without mergingWhat and why
The raw descriptor sync (
7b3da40) runs before every submission: it reads each changed 64 KiB page of the placed shader-visible heaps and mirrors the records the title copied there as bytes. In the first room that is 110 to 140 pages and 35,000 to 41,000 changed records a frame, 30 to 50 ms on the submitting thread, which bounds the frame rate.For each page it called
mirror_copiedfor all 2,048 records, locking the host heap'smadeandcopiedtables per record, though most records of a written page are unchanged.mirror_copied_runnow compares the page's records with the kept ones under one lock and mirrors only those that changed.Full write-up:
docs/descriptor-sync.md.Results
First room, 25 s per run after the room is steady:
2146f542146f5477e1ac777e1ac7The sync is 5 to 9 ms a frame cheaper in every pair; on
77e1ac7the FPS difference is within the run-to-run spread.For scale, the whole sync, measured in one session with live switches (#10; three cycles of 20 s, 49 one-second samples per state,
77c3019): 6.7 FPS / 148.5 ms with it, 8.2 FPS / 121.8 ms without. The sync was written for missing walls and roofs (fxceless/victory-fork#305) and has not been shown to fix them yet; the captures of both states in the first room look the same. Whether it should stay on by default is left open here.Tests
cargo test --release -p victory-gpu: 253 passed, 9 ignored, includingrecords_copied_as_bytes_are_made_at_the_next_sync(copy, replace, remove) andraw_heap_sync_stops_before_dynamic_host_slots.cargo clippyclean; asset policy: 192 files ok. CI green.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-25 09:23 UTC · original
With
local/fxceless-renderat77e1ac7merged (28b69fb):cargo test --release -p victory-gpu253 passed, 9 ignored; clippy clean. A live run on77e1ac7could not be measured: the game stayed on the account screen for 10 minutes (Enter, the stand-in pad's A, was pressed 17 times;71a71a5leaves it within about a minute), and after its window closed the process kept running until it was ended. The numbers above stay those of2146f54.@TaynanGT on GitHub · 2026-11-25 12:49 UTC · original
Correction to my previous comment:
77e1ac7is fine. Since it shows a stand-in window (classVIctory.title) and makes the title's own window message-only, my test scripts, which looked for the title's window class, sent no key and no close. With them fixed,77e1ac7leaves the account screen in 57 s and closes cleanly. A measurement on it is next.@TaynanGT on GitHub · 2026-11-25 13:06 UTC · original
Measured on
77e1ac7(control) against28b69fb(this branch with77e1ac7merged), first room, 25 s per run, runs alternated:The sync itself is 5 to 9 ms a frame cheaper in every pair. The frame rate difference (6.9 against 7.0 on average) is within the run-to-run spread of the control, so on this base the gain does not show in FPS.
@TaynanGT on GitHub · 2026-11-25 19:21 UTC · original · edited 2026-11-25 20:01 UTC
Moved into #11, which holds all of this work on one branch, since merged into
main.Pull request closed