-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asynchronous decompression of compressed formats #4319
Comments
Regarding CHD I am considering implementing in https://github.com/rtissera/libchdr read-ahead decompression in a separate thread which could be enabled or not a compile-time, in order to minimize any stutter / latency. |
This might work well, or might make things worse, depending on the disc access pattern of the game. For instance, Shadow of the Colossus (I don't recall if the EU or US version) reads just all over the place, and constantly seem to be seeking to random locations at the DVD (I analyzed many games when I added the gzip support). At such case, readahead is very likely to make things worse. Also, consider that seeks are very slow with physical DVD, and games know this and access the disk accordingly. I think the async file reader API can already do exactly what the game expects, so as long as you implement the async API actually async, I think you should be good. |
For the game which you tested. As I mentioned, disk access pattern changes a LOT between games, and the only way to assess the change in general is to repeat this test with a LOT of games, and examine the overall results. |
If we finish the read + readahead it in the amount of time PCSX2 gives for an emulated seek (we don't in the above case but probably would with ~half the block size), I don't see how a game's seek pattern could break it |
Now that PCSX2 is getting more and more accurate with disc timings and compressed formats like CSO and CHD getting increasingly popular, it would be unwise not to (further) improve the decompression performance to avoid any stutters/glitches.
We currently support using the OS's async IO for reading isos, but don't have anything in place for decompressing on a separate thread
The text was updated successfully, but these errors were encountered: