OkCredit Nov 22, 2022

OKLayoutInflater

Article Summary

OkCredit's Android team was hitting a wall: complex XML layouts were causing frozen frames and ANRs. AndroidX's AsyncLayoutInflater wasn't cutting it.

The OkCredit engineering team built OkLayoutInflater, an open-source library that supercharges Android layout inflation using Kotlin coroutines. They tackled the limitations of AndroidX's single-threaded approach and achieved dramatic performance gains.

Key Takeaways

Critical Insight

OkCredit reduced frozen frames by 23% and improved RecyclerView performance by switching from AndroidX AsyncLayoutInflater to their coroutine-based solution.

The team shares systrace comparisons showing exactly how parallel inflation transforms scrolling performance, plus their clever workaround for view access timing issues.

Recent from OkCredit

Related Articles