Improving Android video on News Feed with Litho
Jan 31, 2018Udi Cohen

Summary
This post details the migration of video rendering within Facebook's Android News Feed to the Litho UI framework. It addresses challenges in efficiently rendering video content, which is more resource-intensive than text or images, by leveraging Litho's asynchronous layout, fine-grained recycling, and pre-allocation features. The introduction of a `CoreVideoComponent` MountSpec and its composition within `AutoplayVideoComponent` and `VideoAttachmentComponent` LayoutSpecs allows for more flexible and maintainable video UI elements. Performance improvements are highlighted, including reduced object allocations and smoother scrolling due to Litho's recycling system and pre-allocation of video views.
More from the News Feed and Timeline Evolution trail
- Friend Bubbles: Enhancing Social Discovery on Facebook Reels
- A New Ranking Framework for Better Notification Quality on Instagram
- Inside Facebook’s video delivery system
- Improving Instagram notification management with machine learning and causal inference
- A linear programming approach for optimizing features in ML models