airbnb / epoxy

Epoxy is an Android library for building complex screens in a RecyclerView
https://goo.gl/eIK82p
Apache License 2.0
8.46k stars 730 forks source link

Add support for Async Layout inflation with EPoxy #1292

Open varungu opened 2 years ago

varungu commented 2 years ago

EPoxy currently supports only synchronous layout inflation with most of the time during first layout is spent on the inflation of the views.

To make the first layout faster, we should support asynchronous layout inflation. With this approach, the application developer can make heavy views (like video player) asynchronous and improve the page load time

I investigated if we can use a different view like LinearLayout and merge tag in the xml. It won't work with Asynchronous layout inflation since merge tag requires "attachToParent" as true, and asyncronousLayoutInflator inflates with it as false. We will need to use FrameLayout for asynchronous inflation.

TODO

https://user-images.githubusercontent.com/2263278/165597664-3e3355bf-9296-4f78-9ab5-ef4f832099c7.mov

elihart commented 2 years ago

@varungu @vinaygaba can we merge this?

vinaygaba commented 2 years ago

@elihart I think Varun is running a test with these changes.