perf(hle,formats,loader): reclaim xmem pages, fix DirectStorage HoL, reuse audio scratch, and cut lock contention #526
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/gamingwithhomie--larp!526
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-526"
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?
@ZerefDragnee1l on GitHub · 2026-12-06 01:54 UTC · original
ZerefDragnee1l:perf/hle-xmem-dstorage-audio-and-loader→main· +1711 −512 · 22 files · 1 commits · openSplits the HLE, media format decoding, prompt validation, and loader optimizations out of #408 onto current
main.Summary
crates/larp-hle/src/modules/xmem.rs: Safely recycle freed page place slices after last unmap, switch non-alias allocations toSEC_RESERVEon demand, and drop thePHYSICALmutex acrosstitle_memory_remapping.crates/larp-hle/src/modules/dstorage.rs: Prevent Head-of-Line queue stalls on tight staging budgets (start_bypasses_head_of_line_blocking_across_lanes_and_allows_first_large_request), release staging before mip landing, reuse thread-local scratch buffers, and reserve headroom in default worker count.bcpack.rs,texture.rs,files.rs,apu.rs,audio.rs,dsp.rs,xma.rs): Reuse thread-local/voice scratch buffers, remove inner FFT/ring modulo division, preserve XMA2 overlap half-frames on bad frames, speed up bitreader/IMDCT butterflies, and lock-free skip idleXma::pumpslots.storage.rs,xasync.rs,xgamesave.rs): Cachestorage::used_bytesvia Win32 directory change notifications, coalesce delayedXAsynctasks onto a shared timer thread with pool wakeup tracking, and useRwLock+ backgroundSaveWorkerinxgamesave.host.rs,theme.rs,gameinput/{sdl,playstation}.rs,settings/{menu,look,extra}.rs,tls_watch.rs,console_insn.rs,prompts/hook.rs): DropMODULESlock acrossLoadLibraryExA, cache DWM dark-mode state, throttle SDL plug polling + dirty-checked rumble, cache DualSense trigger env, add lock-free closed-menu fast path &OnceLockGDI/path caches, make TLS watch opt-in (LARP_TLS_WATCH=1), expandVirtualQuerycache to 16 slots, and validateprompts/hookmovies in-place before boxing.Verification
git diff --check-> cleancargo check -p larp-> exited 0cargo test -p larp-formats --lib->36 passed; 0 failed; 4 ignored(benchmarks / external reference streams ignored by#[ignore])cargo test -p larp-hle --lib -- --skip look_picture->79 passed; 0 failed; 3 ignored; 1 filtered out(connected pad hardware tests and single-thread timing benchmark ignored by#[ignore];look_pictureskipped)@TrinityForever15 on GitHub · 2026-12-06 03:17 UTC · original
Tested on RX 6650 XT + Ryzen 5 9600X with NVMe,
LARP_DSTORAGE_STAGING_MB=64. Together with #392 it removed the streaming hitches during open-world chases. https://github.com/iceboerg00/larp-amd/issues/64View 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.