Android Developers Blog: Improving App Startup: Lessons from the Facebook App
Article Summary
Facebook's Android app serves 2.9 billion users monthly. Their startup optimization strategy cut bad starts by focusing on one counterintuitive metric.
Google's Android team partnered with Facebook engineers to document how they measure and optimize app startup performance. This collaboration reveals the metrics, targets, and specific techniques Facebook uses to deliver fast, reliable launches across billions of devices worldwide.
Key Takeaways
- Facebook targets 2.5 seconds for Time To Full Display, matching Web Vitals standards
- They measure bad starts: any launch over 2.5s OR with failed content/images
- reportFullyDrawn() API tells Android to prioritize work before that point
- Consistency beats speed: inconsistent performance frustrates users more than slower averages
- Fresh content may beat cached content: measure what users actually value
Facebook prioritizes full content delivery over initial render speed, measuring complete user experience including network calls and image loads to drive meaningful improvements.
About This Article
Facebook app developers needed to figure out why the app was slow or failing to start on billions of devices. The problem was complicated by different network conditions and hardware capabilities. They needed detailed instrumentation to find where the bottlenecks were.
The team built two metrics to track startup performance. Time-To-Initial-Display (TTID) measured when the first screen appeared, while Time-To-Full-Display (TTFD) measured when everything was ready. They used logcat's Displayed value and the Activity.reportFullyDrawn() API to collect this data and find where to optimize.
After tracking these metrics and fixing crashes and reliability issues first, Facebook reduced bad starts. A bad start meant the app took longer than 2.5 seconds to launch or had missing content. The improvements led to better user engagement and how people felt about the app.