Screen Response Time: A Critical Metric for User Experience
Article Summary
OkCredit reduced frozen frames by 40% by obsessing over a metric most Android teams ignore: screen response time.
The OkCredit Android team shares their deep dive into measuring and optimizing how fast screens load after a user taps. While web has First Input Delay and Interaction to Next Paint, Android vitals barely scratch the surface on responsiveness metrics.
Key Takeaways
- Target 100ms or less for screen loads to feel instant to users
- XML inflation uses expensive IO operations and reflection for view creation
- Async layout inflation cut screen load by 25% and frozen frames by 30%
- Jetpack Compose loads slower initially but subsequent screens are faster
- 65% of their frozen frames traced back to high input latency
By treating screen response time as a core metric and systematically optimizing each phase (inflation, measure, layout, draw), OkCredit achieved a 40% reduction in frozen frames.
About This Article
OkCredit's Android team found that Android Vitals only tracks frozen and slow frames. It misses the responsiveness metrics that web platforms measure with First Input Delay and Interaction to Next Paint.
The team built custom instrumentation to measure screen response time. They created an open-source library called android-page-load-instrumentation that tracks how long it takes from a user tap to the first frame rendering across their app.
OkCredit optimized layout inflation, flattened view hierarchies, and moved main thread operations elsewhere. On critical screens, they cut screen load time by 25% and improved frozen frame performance by 30%.