Swiggy Vignesh Muralidharan Oct 17, 2023

Media on Swiggy's Mobile Apps

Article Summary

Swiggy's mobile apps serve millions of users across wildly different devices and network conditions. How do you deliver high-quality images and videos without killing performance or burning through bandwidth costs?

Vignesh Muralidharan from Swiggy's Consumer Apps team breaks down their media optimization strategy. The article reveals four key techniques they use to balance visual quality with load times, from codec selection to intelligent caching.

Key Takeaways

Critical Insight

Swiggy reduced media load times by over 40% while improving visual quality through smart codec choices, network-adaptive resolution, and cache optimization.

The intelligent cache search technique alone saves delivery costs while improving UX during poor network conditions in a way most apps miss.

About This Article

Problem

Swiggy's app relies heavily on media, but handling high-resolution images on-device is expensive. Resizing, scaling, and transforming these images takes a lot of processing power and memory, which slows down how quickly pages render on different phones and devices.

Solution

Swiggy built MediaUrlProvider to request images at the exact size needed for each view. Instead of processing images on the phone, they resize and cache optimized versions in their CDN through their media management service.

Impact

By requesting the right image sizes upfront, Swiggy cut down on device processing and memory use. This made pages load faster and the app more responsive, without asking users to buy new phones.