Meta

Fast Rendering News Feed on Android

Jan 28, 2015Omer Strulovich
Fast Rendering News Feed on Android
SummaryAI, from the source post

This post details the architectural changes made to the Facebook for Android News Feed to improve scrolling performance. The previous approach used custom view classes with a `bindModel` method, which led to issues with view recycling, complicated hierarchies, deep view hierarchies, and computationally intensive binding. The new architecture splits each story into multiple items in the ListView, enabling effective view recycling and amortizing binding time over several frames. It also decouples binding logic from views by introducing 'dumb' custom views and Binder classes with `prepare`, `bind`, and `unbind` methods. A `PartDefinition` class was introduced to manage the hierarchy of story parts and generate binders. These changes resulted in a 17% reduction in out-of-memory errors, an 8% reduction in total errors, and a 10% reduction in maximum frame render time.

More from the News Feed and Timeline Evolution trail