Bruno George Moraes got review request #7000!
Improve optimizegraphics with parellel execution and size/speed trade off
Review Request #7000 - Created June 26, 2012 and discarded
|Bruno George Moraes|
Version 0.5 # * Added parallel execution. # * New recursive default optipng "-o4" shows better size/speed trade off. # * Added pngout pass after optipng reduces size further 5-22%. obs: xargs now uses --max-procs=0 for auto detection of # of threads.
To answer the question about the need of each tool some trade off tests were run: 1) Each type of image content compresses better with optipng or pngout, then to ensure no bias on image content and increase compression ratio at least optipng and pngout have to be available. In both cases compared to only one of the tools the reduction improves in 5-22%. 3) advdef gave a ~1.5% size reduction in tested cases with ~20% speed loss, which is a better trade off than increasing optipng between -o5 -o6 -o7 (anything above -o4 gave a further speed loss of ~24% with size reduction of ~0.01% for each increment). Then it is highly recommended to run all tools, but the first speed switch could be disabling advdef. Another could be changing optipng -o, then the best trade offs are -o4 and -o6. Also pngout is slow but the gains are very good, added the fact of bias towards content type and is difficult not to use it.
I've looked at the changes a bit but I need to review the xargs documentation. I'll probably re-work it later to make some of the tools optional but I won't have the patch be conditional on that given that the script already requires advcomp and the other programs. I won't have time to finish the review tonight though.
This patch has been submitted to the source code repository (see also the bug entry). Thanks so much for the work on this (pngout is really quite a fine tool too, it's a pity the source isn't available).