Mobile/Fatfennec
From MozillaWiki
< Mobile
Contents
Tracking
ID | Priority | Summary | Status | Whiteboard | Assigned to |
---|---|---|---|---|---|
1042363 | P5 | [meta] Reduce Fennec's APK size: building and packaging improvements | NEW | ||
1148979 | P5 | Move NewTabUtils into browser/, out of toolkit/ | NEW | ||
1391715 | P3 | Implement support for EmojiCompat on Android | NEW |
3 Total; 3 Open (100%); 0 Resolved (0%); 0 Verified (0%);
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:
- Conditional compilation for individual SDK versions.
- Removal of antipatterns: bug 1039898, for example.
- Additional optimizations in ProGuard (e.g., bug 1041866, bug 1041852, bug 1001713).
- 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.