[windows] Use condvar wait to reduce sched contention #2686
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "win-use-condvar-wait"
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?
This uses native conditional_var.wait() instead of doing a micromanagement of sleep and stuff. Should change scheduling policies to reduce thread contention. Windows particularly doesn't like small quanta anyways. This may also fix Windows ARM.
Keywords: May, should
Signed-off-by: lizzie lizzie@eden-emu.dev
Need to test on Windows, but @Lizzie, looks like this is having an adverse effect on Steam Deck. It is causing frame dips in TOTK out of random playthroughs. Potentially a thread is going to sleep or waiting and never gets a signal. You might be able to direct John on what to look at to see if we can catch it.
Reduced performance on Windows considerably on various games; STL implementation for condvar is not appropriate, perhaps busy wait?
Pull request closed