-
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
Implement --terse CLI flag #419
Comments
shssoichiro
added
I-Minor
Issues that would be nice to have fixed, but are the lowest priority
T-Feature
Requests for a new feature to be added
labels
Aug 23, 2021
This was referenced Mar 29, 2023
How about #489 as a solution for this? |
Perhaps. The pull request doesn't show an example of how the output looks with or without. |
I would also find this useful, for the same reasons. We process hundreds of images per document, and a summary of one line per image would be perfect. |
shssoichiro
pushed a commit
that referenced
this issue
Jul 11, 2023
This PR makes the oxipng binary process multiple files in parallel, finally fulfilling #275. There seemed to be some debate about whether oxipng _should_ do this or not but there's a couple of reasons I think it makes sense: 1. The concern seemed mostly around the complexity of such a feature. Not to worry, it was trivial* 🙂 2. Since then, oxipng has dropped from a max of something like 180 simultaneous compression trials down to 10, which is very much a good thing but it does mean it's not utilising any more cores than that. Some benchmarks on around 100 files on a machine with 8 cores: Level | Master time | PR time -|-|- 2 | 28.303 | 19.005 3 | 36.507 | 23.089 5 | 1:10.86 | 1:16.01 *Some additional changes were required in order to make sure sensible output is printed to the terminal, since things won't be in order anymore. Here's some example output from before: ``` Processing: tests/files/fully_optimized.png file size = 67 bytes (0 bytes = 0.00% decrease) File already optimized Processing: tests/files/corrupted_header.png Invalid PNG header detected Processing: tests/files/verbose_mode.png file size = 102480 bytes (12228 bytes = 10.66% decrease) Output: tests/files/verbose_mode.png ``` And after: ``` Processing: tests/files/verbose_mode.png Processing: tests/files/fully_optimized.png Processing: tests/files/corrupted_header.png tests/files/corrupted_header.png: Invalid PNG header detected tests/files/fully_optimized.png: Could not optimize further, no change written 102480 bytes (10.66% smaller): tests/files/verbose_mode.png ``` Closes #275, #84, #169, #196 and #419. [edit] This is the last thing I wanted to land before the next release 🥳
Verbosity and default output is much improved in the v9 release. |
Pr0methean
pushed a commit
to Pr0methean/oxipng
that referenced
this issue
Dec 1, 2023
This PR makes the oxipng binary process multiple files in parallel, finally fulfilling shssoichiro#275. There seemed to be some debate about whether oxipng _should_ do this or not but there's a couple of reasons I think it makes sense: 1. The concern seemed mostly around the complexity of such a feature. Not to worry, it was trivial* 🙂 2. Since then, oxipng has dropped from a max of something like 180 simultaneous compression trials down to 10, which is very much a good thing but it does mean it's not utilising any more cores than that. Some benchmarks on around 100 files on a machine with 8 cores: Level | Master time | PR time -|-|- 2 | 28.303 | 19.005 3 | 36.507 | 23.089 5 | 1:10.86 | 1:16.01 *Some additional changes were required in order to make sure sensible output is printed to the terminal, since things won't be in order anymore. Here's some example output from before: ``` Processing: tests/files/fully_optimized.png file size = 67 bytes (0 bytes = 0.00% decrease) File already optimized Processing: tests/files/corrupted_header.png Invalid PNG header detected Processing: tests/files/verbose_mode.png file size = 102480 bytes (12228 bytes = 10.66% decrease) Output: tests/files/verbose_mode.png ``` And after: ``` Processing: tests/files/verbose_mode.png Processing: tests/files/fully_optimized.png Processing: tests/files/corrupted_header.png tests/files/corrupted_header.png: Invalid PNG header detected tests/files/fully_optimized.png: Could not optimize further, no change written 102480 bytes (10.66% smaller): tests/files/verbose_mode.png ``` Closes shssoichiro#275, shssoichiro#84, shssoichiro#169, shssoichiro#196 and shssoichiro#419. [edit] This is the last thing I wanted to land before the next release 🥳
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Currently, oxipng supports two relevant flags;
-v
for verbose, which as far as I can tell is only useful for debugging of oxipng itself, and-q
for quiet mode, which completely suppresses any output.Here's an example with the default output:
I think this is exceptionally verbose for something that is part of a build chain.
An option like
--terse
(or something else equivalent) to produce output like for exampleWhich would be enough for me.
Or perhaps
(src dest origsize compressed %)
Or some other way that makes it easy to parse programmatically (perhaps \t separators).
Thank you for an awesome tool, and thank you for reading my ticket!
The text was updated successfully, but these errors were encountered: