On Sun, May 1, 2016 at 6:54 AM, Henri Sivonen <hsivo...@hsivonen.fi> wrote:

>
> What bothers me the most regarding size of what we ship is
>
>  * Failure to make the most out of compression (i.e. Zopfli) before
> objecting to the addition of new things stuff. I've brought this up
> before, but just now, I downloaded the (en-US API level 15) APK for
> Fennec 46 and ran ImageOptim (https://imageoptim.com/mac) on the PNG
> files included directly in the APK (i.e. not the one hidden inside
> omni.ja). ImageOptim says: "Saved 311KB out of 1.7MB. 28.6% per file
> on average (up to 94.3%)." (There wasn't a single already-optimal PNG
> there!) Additionally, the same exercise could be repeated for images
> in omni.ja.


We do optimize images before they land in the tree, although we usually use
pngcrush, and there may be some older assets that landed before we made
this common practice. However, Sebastian ran an analysis recently and found
that there's actually not much left to optimize (~35kb):
https://bugzilla.mozilla.org/show_bug.cgi?id=1266156

What you may actually be seeing is the fact that AAPT's optimization tool
may actually increase the size of optimized PNGs:
https://bugzilla.mozilla.org/show_bug.cgi?id=1266156


> Then all the XML and JS could be Zopflified. The bundled
> .ttf files could be turned into Brotli-compressed WOFF2 files.


We recently landed a change to make fonts downloadable by default, so these
aren't even included in our APK anymore:
https://bugzilla.mozilla.org/show_bug.cgi?id=1194338

We also have a GSoC student this summer who's going to work on making more
parts of the APK downloadable at runtime.

On Mon, May 2, 2016 at 3:28 AM, Henri Sivonen <hsivo...@hsivonen.fi> wrote:

> On Mon, May 2, 2016 at 2:37 AM, Jim Blandy <jbla...@mozilla.com> wrote:
> > What are the distributions of memory and flash sizes for the devices
> people
> > currently run Fennec on? It'll be almost impossible to have a good
> > discussion about Fennec size without those numbers. I seem to remember
> that
> > is data we felt was okay to collect.
>
> We should also be data-driven about understanding where the bytes go.
> In particular, I think functionality-neutral size reductions should be
> done before blocking new functionality from landing. In addition to
> unoptimally compressed PNGs, there's unminified JS in Fennec (i.e. the
> JS comments are shipped).
>

We landed a change a while back to minify JS, and we verified this morning
that all JS seems to be minified in components/chrome/toolkit:
https://bugzilla.mozilla.org/show_bug.cgi?id=1039902

I think the Firefox for Android APK size issue merits its own discussion,
outside the context of this ICU thread. I'd encourage anyone who's
interested in helping out to take a look at the meta bug where we've been
tracking our effort to reduce APK size:
https://bugzilla.mozilla.org/show_bug.cgi?id=942609

There are a lot of ideas in there, but we haven't had time to explore
fixing them all.

Margaret
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to