-
Notifications
You must be signed in to change notification settings - Fork 123
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
Refactor optimize_raw #670
Conversation
@AlexTMjugador Thanks for merging the APNG update, hope you're ready for another one 😄 I've got one minor fix which I'll post after this and then we can probably do another release. |
Thanks @andrews05 - I do (slightly) prefer the original verbose output. I occasionally write scripts to extract a result (e.g. filter tested), so for some these changes may break their workflow. If no one speaks up, I'm sure it's absolutely fine. 👍 Oh- and if you are adding zopfli iterations, as per #658 (comment), that would be an awesome addition!! 🤞 |
Is there something in particular you think could be improved, or is it just a matter of updating the script to handle the new output? I’m afraid the output isn’t something the user can rely on to be “stable” and changes between versions (even minor versions) can be expected.
Unfortunately no, this is just showing the value of the |
Ah. That's not really changing after we set the CLI parameters, right?... So surely it will just always report our initial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, it looks good to me!
On a related note, I don't believe changing the output status text format should be considered a breaking change for semver purposes, as such output was never meant to serve as a non-human interface to begin with. However, introducing a JSON-formatted output, a stable, script-friendly format toggle, or something along those lines in the future could help with use cases that depend on parsing status messages.
Thanks @AlexTMjugador, good tip on @ace-dent Yes, that's correct. It's just like how we show |
Code always tends to get messy over time. I've found the
optimize_raw
function increasingly harder to read, particularly after the addition of fast mode, so I've taken some time to refactor and simplify it.One change of note here is the main compression trials now use the Evaluator. This means verbose output is a little different which is shown below.
There is no change to performance or output size.
-vvo2
: master-vvo2
: PR-vvZo5
: master-vvZo5
: PR