Instagram Aug 15, 2023

Improving Comment Rendering on Android

Article Summary

Instagram's Android team faced a brutal problem: complex captions with emojis and links were causing 50ms UI thread blocks, making scrolling feel janky even on flagship devices.

The Instagram Engineering team tackled text rendering performance on Android, where long captions with emojis were dropping frames during feed scrolling. They implemented a series of optimizations to reduce jank by 60%.

Key Takeaways

Critical Insight

By caching text layouts and warming up Android's TextLayoutCache on background threads, Instagram reduced dropped frames by 60% and cut text drawing time from 50ms to under 6ms.

The team's approach to predictive cache warming based on scroll direction is particularly clever and applicable to any list-heavy Android app.

Recent from Instagram

Related Articles