Meta
Meta logoMeta · Feature trail

App Size Compression and Optimization

1 post · Nov 2013 – Sep 2021

What this trail covers

Meta's approach to managing app size has evolved to include advanced compression techniques beyond traditional methods. Project LightSpeed for Messenger on iOS involved a complete rewrite of the codebase, reducing core code by 84% and binary size by 75%. This was achieved by leveraging native OS features, reusing UI components with dynamic templates powered by SQLite, and using SQLite as a universal system for data storage and management. A server broker was introduced as a gateway to server features. This post details efforts to improve Messenger's startup time and overall performance on Android and iOS by removing non-essential code, optimizing dependency injection via bytecode manipulation (ASM), reusing view controllers, moving audio playback to background threads, and reducing network requests. It also highlights the implementation of automated startup-timing tests on physical devices to catch performance regressions.

All Meta trails