hrydgard/ppsspp — pull request #3126 by unknownbrackets (2013-08-11 19:13:15+00:00)
Title: Use a separate thread for reading/writing

This is enabled by default currently, since it should be pretty safe.

When HLE read/write functions are called, they're now read on a thread while the CPU/GPU continue doing their thing. Primarily goal here is to reduce stutter a bit during larger disk reads especially (since they were previously synchronous.)

The IO is not actually overlapped/async (which it's possible the PSP does support.) It uses the same blocking functions and a queue, but runs in parallel to the CPU.

Timing showed that this was also a net performance win, although a very small one (but that means the overhead of waiting and checking the thread was made up for.)

Unlike the GPU change, this change is entirely driven by the CPU. The only observable difference is that now, after calling `sceIoReadAsync()`, the buffer will not already be filled (which is how it works on an actual PSP.)

Of course, there's more that can be done. IO seems to happen on the PSP using actual thread scheduling and priorities, which are still ignored.

-[Unknown]