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

Tweaks to gcz compression / decompression #1597

Merged
merged 4 commits into from Dec 1, 2014

Conversation

unknownbrackets
Copy link
Contributor

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]

This improves performance by around 20% for me, and the memory use impact
is negligible considering Dolphin is otherwise unusable.
@@ -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.

@waddlesplash
Copy link
Contributor

LGTM

@JMC47
Copy link
Contributor

JMC47 commented Nov 27, 2014

I'll test this change. More or less commenting so that someone can bother me if i forget.

@lioncash
Copy link
Member

@unknownbrackets Alright, cool.

(replied here because the diff comment disappeared for some reason, sorry.)

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.

@PatrickFerry
Copy link
Contributor

I guess this was made in response to #7794
Code LGTM!

@JMC47
Copy link
Contributor

JMC47 commented Nov 28, 2014

Works fine for me. Good fix for user friendliness.

@unknownbrackets
Copy link
Contributor Author

Actually, I didn't even know about #7794, just noticed this. But seems like this will resolve that indeed.

-[Unknown]

@unknownbrackets
Copy link
Contributor Author

Is this waiting on me for any other adjustments?

-[Unknown]

@lioncash
Copy link
Member

lioncash commented Dec 1, 2014

Nope, just forgot to merge it.

lioncash added a commit that referenced this pull request Dec 1, 2014
Tweaks to gcz compression / decompression
@lioncash lioncash merged commit 6df67bf into dolphin-emu:master Dec 1, 2014
@unknownbrackets unknownbrackets deleted the gcz-tweaks branch December 1, 2014 08:21
@shuffle2
Copy link
Contributor

This caused issue 8206 http://code.google.com/p/dolphin-emu/issues/detail?id=8206
IMO It should just be reverted and re-merged when fixed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants