perf(gpu): batch no-op buffer refresh checks and reduce lock contention #318
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/trustno1-coder--VIctory-NVIDIA!318
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-318"
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?
@wike1701 on GitHub · 2026-11-27 20:58 UTC · original
wike1701:perf/batched-noop-refreshes→main· +168 −28 · 3 files · 1 commits · openSummary
Reduces CPU overhead in the open-world buffer refresh hot path (Batch::refresh_front and Batch::flush_all), where real open-world captures spend ~28–32 ms/frame checking ~10,000 buffer refreshes of which ~85–90% are unchanged no-ops.
Changes
ead_journal() (crates/victory-gpu/src/watch.rs): allows holding one JOURNAL read guard across a chunk of
othing_new checks instead of acquiring/releasing the global RwLock ~10,000 times per frame.
anged mutex locks on read-only / non-ranged buffers in
othing_new_with, writes_pending, writes_pending_in, and
anged.
efresh_front and lush_all in 32-item chunks per worker claim (1 atomic increment + 1 JournalRead + 1 FLUSHES[2] atomic increment per chunk instead of per item). JournalRead is always dropped before calling Self::update, preventing any RwLock upgrade deadlock.
Verification
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.