Skip to content
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

Move ISO decompression to a separate thread #4321

Merged
merged 7 commits into from
Jul 19, 2021

Conversation

TellowKrinkle
Copy link
Member

@TellowKrinkle TellowKrinkle commented Mar 25, 2021

Closes #4319

When loading from a mostly-LZMA CHD (SSD, i7-4980HQ w/ turbo boost off)
Time to play P3FES intro cutscene (disk-heavy, linear, timed with phone stopwatch)

  • Uncompressed ISO: 57s
  • Async + Readahead: 57s
  • Asyncronous: 61s
  • Synchronous: 65s

I was expecting hunk size to make more of a difference, but results were about the same for both my default settings (~20kb hunks) chd and max size one (~1mb hunks, chdman refuses to make bigger ones), however this FMV reads 100% linearly, so that might be why.

Also for anyone on slow HDDs, this also means that using compressed formats won't take away your async file reading (previously none of the compressed disk readers used async file APIs. They still don't but now they don't block the EE thread calling them)

@lightningterror lightningterror added this to the Release 1.8 milestone Mar 25, 2021
@TellowKrinkle TellowKrinkle force-pushed the AsyncDecompress branch 2 times, most recently from 384e2cf to d031ae2 Compare March 27, 2021 23:28
@lightningterror
Copy link
Contributor

Needs rebase.

Useful for things that don't want an entire pxthread
Now with 100% less `delete`s
If buffers are smaller than the threshold PCSX2 uses to decide whether to time a read as a seek, ThreadedFileReader fails to provide data in time for the very small linear read time cutoff
@lightningterror lightningterror merged commit d4f8711 into PCSX2:master Jul 19, 2021
@TellowKrinkle TellowKrinkle deleted the AsyncDecompress branch July 24, 2021 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asynchronous decompression of compressed formats
5 participants