Swiggy Dec 20, 2022

Fan-tastic Search for Blazing Fast Results

Article Summary

Swiggy's search feature was a mess: 2,000+ lines in a single ViewModel, monolithic XML files, and performance issues. Time for a complete rewrite.

The Swiggy Android team rebuilt their search module from scratch, introducing backend-driven UI, Protobuf instead of JSON, and breaking monolithic components into reusable widgets. This deep dive shares the architectural decisions and measurable performance wins.

Key Takeaways

Critical Insight

The rewrite delivered measurable performance gains across GPU rendering, memory allocation, and response times while making the codebase maintainable and scalable.

They even automated analytics events through the backend to stop releasing new app versions for tracking changes.

About This Article

Problem

Swiggy's search module had a problem. Every sprint brought changes to analytics events, which meant the app needed new releases. The analytics logic was built directly into the client code, making it hard to separate concerns.

Solution

Viswanathan K P's team moved analytics to the backend. They added an analytics block to each list item contract. This let them configure events without pushing app updates.

Impact

The team stopped needing new app releases to fix analytics issues. Deployment cycles got shorter and they could adjust events in real time when new features launched.

Recent from Swiggy

Related Articles