-
Notifications
You must be signed in to change notification settings - Fork 125
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
Workaround weird regression with &[u8] and zopfli #595
base: master
Are you sure you want to change the base?
Conversation
I'd like to fix this in the Zopfli crate itself instead, but let's keep this PR open in case I'm unable to do so in a timely fashion. |
Sounds good. I'm thinking we should do a point release once this is fixed. |
@andrews05 could you please rebase the branch so that I can grab the latest CI build for testing? Thanks! |
26ba9bd
to
90aa6ac
Compare
@XhmikosR Done |
Is the artefact build good enough for some regression testing? Or should I wait for the point release? |
90aa6ac
to
9455825
Compare
Yeah, it should be perfectly good for testing, feel free. I’ve just rebased again so you should see a new build in a moment. Note you may see some cases where the “fix” makes it worse, but on average it’s an improvement in my observations. |
Oh, looks like there are some new clippy lints I need to fix. I’ll try and sort that soon… |
Success! @AlexTMjugador What do you think, will you have time to investigate or shall we just use this for now? |
@andrews05 just my 2 cents. The clippy fixes could go into master separately, but this makes me wonder how come you guys are hitting this inconsistency. I believe you need to enable the repo option for branches to always be up to date so that you catch such issues before landing something in master. |
I think the Clippy lint fixes should have been pushed to the main branch separately, so that this and other PRs could be rebased on top of those changes and benefit them all. But I'm doing the cherry-picking and rebasing now, so no worries here.
Next week I finally have some days off which I could use to dedicate some time to open source work like this, but no promises 🙂 |
Hey gang... any chance of rebasing to main, to regenerate the CI artefacts? 🙏🏻 |
6c9a9bc
to
b7a0767
Compare
@ace-dent done. Let me know your observations with and without this patch. |
@andrews05 - nice! Thanks! |
@andrews05 could you please rebase the branch? TIA! |
b7a0767
to
23e6abe
Compare
@XhmikosR Done. Are you finding any improvement from this change? |
Thanks! I need to test again with new files because I've already had a run with this patch in the past. I remember there were some small savings, but I'll try to get back to you with numbers. Maybe @ace-dent has a recent benchmark. |
@XhmikosR I won't be in position to do thorough testing for a few weeks. |
I tested @ace-dent's repos and there was no difference between 9.1.2 and this PR, although there were improvements:
But I tested a few images created with Firefox's built-in screenshot tool and this PR resulted in consistently better compression. OS: Windows 11 (Pro) x86_64 / WIN32_NT 10.0.22631.3880 (23H2)
And a screenshot taken with the Windows snipping tool:
|
@XhmikosR Nice, thanks for the info! |
@andrews05 could you please rebase the branch one more time? BTW, any reason why this hasn't landed yet? I mean, I know it doesn't fix the root cause but it does yield better compression. Thanks! |
23e6abe
to
4a59d98
Compare
@XhmikosR Done. |
I clearly didn't have the chance to delve into the matter that week I planned to 😅 Researching a more proper fix for this behavior should be relatively straightforward though, nothing too complicated for an afternoon or so. The problem being that almost always another thing to do appears in my afternoons... But I'd like for me or someone else to get around to it, eventually. |
Fixes #579. In lack of a proper understanding of what's going on here and why the issue is happening, this workaround will do for now.