[webkit-dev] optimising png files in LayoutTests - an experiment

Elliot Poger epoger at google.com
Wed Jan 25 13:57:20 PST 2012


In deciding whether to just let the PNGs get shrunk over time or to do a
pass over all of them at once, I think we should decide what we are trying
to optimize for.  (Download time for initial checkout of the webkit tree?
 Time for existing developers to update their trees?  Storage space in the
repository?)

I would think that, except for initial checkout of the webkit repository,
the others would be optimized by lazily converting the files (waiting until
we need to check in new baselines, instead of shrinking them all at once).

On Wed, Jan 25, 2012 at 1:12 PM, Dirk Pranke <dpranke at chromium.org> wrote:

> I like the idea. I'm not sure I agree w/ Adam that I'd roll the code
> into DRT, insofar as I don't know how big it is and I would definitely
> want the code shared across all of the DRT implementations. I'd
> probably also do a pass over all of the existing PNGs at some point
> rather than wait for them to be updated as necessary.
>
> -- Dirk
>
> On Tue, Jan 24, 2012 at 10:43 PM, Mike Lawther <mikelawther at chromium.org>
> wrote:
> > Hi guys,
> >
> > Just thought I'd share the results of an experiment I did in optimising
> the
> > png files in LayoutTests.
> >
> > I used a tool on Mac called ImageOptim (http://imageoptim.pornel.net/)
> which
> > tries a set of different png lossless optimising tools (like pngcrush - I
> > also downloaded and included PNGOUT). Note that this strips out some of
> the
> > stuff we need, like the hash, so if doing this for real we'd have to
> watch
> > out for that.
> >
> > My results were:
> >
> > Before:
> > $ ls -laR LayoutTests/ | grep png$ | awk '{total = total + $5}END{print
> > total}'
> > 1220535840
> >
> > Test:
> > $ find LayoutTests/ | grep png$ | xargs open -a ImageOptim.app
> >
> > After:
> > $ ls -laR LayoutTests/ | grep png$ | awk '{total = total + $5}END{print
> > total, 1220535840 - total}'
> > 937198328 283337512
> >
> > So this has saved ~280MB (~23% of the original size).
> >
> > Based on this, it seems worthwhile to include a png optimiser somewhere
> in
> > the patch upload/submit toolchain, and also (separately) to optimise the
> > existing pngs.
> >
> > Thoughts?
> >
> >     mike
> >
> >
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
> >
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120125/73538698/attachment.html>


More information about the webkit-dev mailing list