7 ms·
This is really nice, but it would be good if they could release some metrics for their example such as the News Feed. How much did it improve the scroll perform
by binthere 9y ago
This is really nice, but it would be good if they could release some metrics for their example such as the News Feed. How much did it improve the scroll performance? The main reason is because I'd like to know if the extra complexity is worth the effort. I'm sure that from Facebook scale any improvement is important but how good is it?
It is mentioned in the article that Android documentation does not recommend doing multithreading optimizations since the UI Toolkit itself is not thread-safe, does this mean that Android's own UI Toolkit cannot be used within this context? What is the level of integration that Litho and Android's UI Toolkit can have? Also, in regards to Android's Accessibility APIs, does Litho components handle/have that capability?
I guess I should have done a bit more research/experimentation on Litho, but these are some questions I have. I'd really love to use it though.
- BoorishBears 9y agoFor the record, I prefer Litho regardless of performance characteristics. The immutable data model works really well with AutoValue, which in turn works well with lots of things in Android and I find the API a lot cleaner than the default RecyclerView API (there are alternative Adapter implementations for RecyclerView that bring it's API closer to Litho)
- sandGorgon 9y agowhat alternative adapter implemntations are there ? could you cite anything ?
- BoorishBears 9y agoAirbnb's Epoxy is the best one I've used: https://medium.com/airbnb-engineering/epoxy-airbnbs-view-architecture-on-android-c3e1af150394 https://medium.com/airbnb-engineering/epoxy-airbnbs-view-arc... https://github.com/airbnb/epoxy https://github.com/airbnb/epoxy
- deleted 9y ago[deleted]
- dowhileone 9y ago> How much did it improve the scroll performance? We are still have some more work to do in News Feed but on other surfaces in the app we have seen a 42% improvement in skipped frames when converting from Views to Litho. This is measured by sampling skipped frames while scrolling in production. > does this mean that Android's own UI Toolkit cannot be used within this context? Views should not be accessed on a background thread according to the Android documentation. Litho renders inside of a light weight wrapper view and interacts with this wrapper view on the UI thread. Nevertheless, Litho moves most of the heavy lifting from rendering to the background. > What is the level of integration that Litho and Android's UI Toolkit can have? During the conversion to Litho, News Feed rendered with some standard views and some Litho >in regards to Android's Accessibility APIs, does Litho components handle/have that capability? Yup! It's a full featured UI framework. Animations are under active development though.