OkCredit Oct 18, 2022

How We Reduced Our ANR by Three Times

Article Summary

OkCredit slashed their ANR rate by 67% and cold startup time by 70%. Here's how they debugged one of Android's most frustrating problems.

The OkCredit Android team dove deep into Android's source code to understand ANR triggers at the system level. They discovered the surprising connection between cold startup performance and background ANRs, then systematically eliminated bottlenecks across broadcast receivers, services, and the main thread.

Key Takeaways

Critical Insight

OkCredit achieved 0.03% ANR rate by treating cold startup optimization as the key to preventing background service timeouts.

The article includes a deep dive into Android's native InputDispatcher code that reveals why ANRs don't always appear when you'd expect them.

Recent from OkCredit

Related Articles