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
Tweaks to gcz compression / decompression #1597
Conversation
This improves performance by around 20% for me, and the memory use impact is negligible considering Dolphin is otherwise unusable.
This saves 6% time.
@@ -163,11 +163,19 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u | |||
scrubbing = true; | |||
} | |||
|
|||
z_stream z; | |||
memset(&z, 0, sizeof(z)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
LGTM |
I'll test this change. More or less commenting so that someone can bother me if i forget. |
@unknownbrackets Alright, cool.
Ah, this is actually my fault. I deleted it because I accidentally commented on the commit, when I wanted to put the comment on the PR. Sorry about that. |
I guess this was made in response to #7794 |
Works fine for me. Good fix for user friendliness. |
Actually, I didn't even know about #7794, just noticed this. But seems like this will resolve that indeed. -[Unknown] |
Is this waiting on me for any other adjustments? -[Unknown] |
Nope, just forgot to merge it. |
Tweaks to gcz compression / decompression
This caused issue 8206 http://code.google.com/p/dolphin-emu/issues/detail?id=8206 |
This makes it so you can cancel either process, it does after all take quite some time. It also improves the speed of compression and decompression.
I've also found that std::fill(), at least via MSVC, is significantly slower than memset() (where equivalent.) It seems like changing this one would give up to another 6% gain for Wii isos:
https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/DiscIO/DiscScrubber.cpp#L135
Also, adding cancel results in a Close button when compression finishes, which is obviously significantly better UX than having to click X.
-[Unknown]