During the F8 conference, Facebook announced Litho

Apr 19, 2017 07:30 GMT  ·  By

Facebook introduced a new open-source declarative framework for building efficient user interfaces on Android, called Litho. This is the same framework Facebook uses to build its own Android apps, so we already know it's quite good. 

The announcement was made during Facebook's F8 developer conference. The first time the company brought up this framework was last fall when Facebook was trying to figure out how to build a more performant framework for displaying the Facebook News Feed. The problem was that this particular framework is more complex than regular scrollable lists that are regularly optimized for Android.

"As UIs become increasingly sophisticated, it gets harder to complete all the rendering work that needs to get done in this frame. This proves to be especially challenging with dynamic scrolling surfaces, as new pieces of UI are constantly being introduced on screen," said Facebook's Pasquale Anatriello and Marco Cova in the company's announcement.

A great solution for feed-based apps

Litho has a built-in system that improves scroll performance by 35% by breaking down complex views into smaller components, like text, images, and videos. This way, the render can happen incrementally, speeding up the process.

While it's true that Litho was built for Facebook to fix Facebook problems, many other apps out there focus on the idea of a feed. Even if developers won't use Litho as such, the fact that it is open-source means they can find something to suit their needs in there which they can adapt in order to fix other issues they may encounter.

Litho is available on GitHub, and it also has a homepage to help everyone better understand the project. Facebook also took it upon itself to make a number of tutorials and technical instructions for those who are planning to play around in Litho.