perf(victory-gpu): reuse fault_buf and shrink oversized refused set in memory #426
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from LooperSalty/AnyXboxX. Originally posted by Lewandox on 2026-11-26T18:15:00Z.
Summary
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