Android Search Performance Improvements (Part 2)
Article Summary
Yelp's Android team cut search render time nearly in half while slashing dropped frames by 48%. Here's how they did it.
This is part 2 of Yelp's deep dive into Android search performance optimization. After establishing baselines in part 1, the team tackled two core metrics: initial render time and scroll performance. They used CPU profiling and systematic testing to identify bottlenecks.
Key Takeaways
- Async view inflation during network requests saved 50-80ms on initial render
- View model caching cut dropped frames from 33% to 17% during scrolling
- RxJava offloaded non-critical work to background threads, freeing the UI thread
- P50 search performance improved from 350ms to 190ms, P90 from 656ms to 394ms
Strategic use of async inflation, view model caching, and background threading delivered a 46% improvement in search render time and dramatically smoother scrolling.
About This Article
Yelp's Android search list was doing expensive calculations that took 10-20ms each time a view needed to bind business data. This happened on the main UI thread, which caused noticeable slowdowns, especially on older devices.
Tyler Argo's team built a view model builder class that computed all business properties once and cached the results by business ID. This eliminated redundant calculations during view binding and recycling.
Scroll performance improved significantly. Dropped frames during scrolling fell from 33% to 17%. The view model caching also made it possible to write comprehensive unit tests instead of relying on slower integration tests.