perf(victory-gpu): reuse fault_buf and shrink oversized refused set in memory #426
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!426
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-426"
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?
@Lewandox on GitHub · 2026-11-26 18:15 UTC · original
Lewandox:perf/memory-reuse-fault-buf-and-shrink-refused→main· +48 −3 · 1 files · 2 commits · merged 2026-11-26 18:31 UTCSummary
Reduces per-frame heap churn and cleans up stale heap/refused-page retention in
third_party/victory/crates/victory-gpu/src/memory.rs:take_faults():take_faults()unconditionally created a freshVec, scanned allMEMORY_FAULTS, and only avoided allocation becauseVec::new()is lazy; now tracks a reusablefault_buf: Vec<u32>onMemory(shrunk if oversized) so fault bursts do not reallocate per frame.refusedset capacity on frame rollover:m.refusedgrows large during loading spikes (scanning root constants that are not title memory), clearing it on the next frame now callsshrink_to(256)so peakHashSetbucket tables are not retained forever.clear_refused_reclaims_oversized_capacity_and_keeps_warm_setverifyingclear_refusedreclaims oversizedHashSetcapacity while preserving small warm capacity.Verification
cargo test -p victory-gpu --lib memory::tests(default and--features diagnostics)cargo xtask policyinsidethird_party/victory