Macramé: Untangling the Knot on the Etsy Android Listing Screen
Article Summary
Etsy's Android listing screen had 4,000+ lines of code in a single file, single-digit test coverage, and 200 experiments running. Something had to give.
The Etsy Android team rebuilt their most critical screen using a reactive architecture called Macramé. This post details their 5-month journey from spaghetti code to a maintainable, testable system inspired by Spotify's Mobius.
Key Takeaways
- Time to First Content dropped 18% (1585ms to 1298ms)
- Unit test coverage jumped from single digits to 76%
- Add to cart increased 0.43%, listings viewed up 2.4%
- Immutable State + sealed Events provide compile-time safety
- RecyclerView with ListAdapter enables async diffs, avoiding layout pauses
Etsy's architectural rewrite delivered both faster performance and happier developers, with the pattern now expanding to Cart and Shop screens.
About This Article
The listing screen had a monolithic architecture that made it hard for developers to test business logic. Tests became complex and brittle, causing continuous integration failures whenever unrelated changes were made.
John Kalmi's team built Macramé, a reactive architecture based on immutable State objects sent through StateFlow. They used sealed Event classes and Handler classes, each one handling a single Event type.
After the architectural rewrite, buyers viewed 2.4% more listings on average. Searches went up 2%, and photo views on buyer reviews increased 3.3%.