Mobile/Fatfennec

From MozillaWiki
< Mobile
Revision as of 22:16, 22 July 2014 by Rnewman (talk | contribs) (→‎APK)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Tracking

Bugzilla query error

Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 406 [1] => Not Acceptable ) ) 1


Goals

"Fatfennec" is the alias for an ongoing project to have Fennec use fewer bytes.

That means:

  • A smaller APK, which is faster to download, doesn't cause upgrade or install failures due to lack of storage (which helps our Growth and Ecosystem goals), and uses less space on disk.
  • Smaller runtime burden -- smaller and fewer databases, careful discarding of temporary files, etc.

APK

Contributing factors:

  • Raw quantities of Java. We can reduce this via:
  • Raw quantities of JS. We can reduce this via:
    • Removing features that we don't use (e.g., Shumway).
    • Minifying: bug 1039902.
    • Not shipping JS source at all: bug 696095.
  • Assets. We ship:
    • > 7MB of fonts.
    • A few MB of images, some of which are at DPI levels that will never be used on a particular device.
    • More than 50 locales at 120KB each. Not all of these will be functional on every API version.

Approach:

  • Reduce costs for each segment of users by building at least two different APKs. One targets API 9, one targets API 13+ (or 10+ if we want to continue to support Honeycomb). Each of these APKs only includes the relevant code (saving 35KB+ of compressed APK, and making the browser faster). The API 9 APK can exclude fonts, hdpi/xhdpi/xxhdpi/xxxhdpi images, tablet layouts, Android Beam code etc., and locales that don't function on API level 9.
  • Reduce costs for all users by attacking minification and other total-reduction items.

Runtime

To follow.