One Activity to Rule Them All: Reducing Crashes in the Etsy App
Article Summary
Etsy was getting 1,000 Out of Memory crashes per day on Android. The culprit? A navigation architecture from 2012 that couldn't handle modern browsing behavior.
The Etsy Android team tackled their top crash cause by migrating from a one-Activity-per-screen architecture to a single-Activity design with Fragments. They broke the migration of 40 Activities into three milestones, A/B testing each phase to measure business impact.
Key Takeaways
- OOM crashes dropped 60% (from 1,000 to 400 daily) after first milestone
- Single Activity with Fragments destroys Views on backstack, drastically reducing memory footprint
- FragmentLifecycleCallbacks pattern elegantly handles shared screen elements across all screens
- Conversion rate increased 1.5%, GMS per buyer up 1.1% in initial experiment
- Migration enabled new features like separate backstacks per bottom nav tab
By modernizing their navigation architecture, Etsy cut OOM crashes by 60% while improving conversion and unlocking new UX capabilities.
About This Article
The Etsy app's 2012 architecture created one Activity per screen. During infinite browsing sessions, this meant unlimited Activities piled up on the back stack. Each one kept its full View state in memory, and as user engagement grew, the app ran out of memory and crashed.
John Kalmi's team moved 40 Activities over to a single-Activity architecture built with lightweight Fragments. They added FragmentLifecycleCallbacks to handle shared elements like titles, back buttons, and keyboard state across all screens.
Memory usage dropped noticeably when users navigated between screens. The OOM crashes that remained after the first milestone actually helped. They showed the team what was needed for new features like separate backstacks for each bottom navigation tab, which made navigation more flexible.