Swiggy Oct 25, 2022

Optimizing Configuration Time for Android Apps that Use React Native

Article Summary

Swiggy's Android team was losing 1+ minute on every single build. For a team generating 55 builds daily, that's death by a thousand paper cuts.

Balvinder Gambhir from Swiggy's engineering team diagnosed why adding React Native to their super app caused Gradle configuration times to skyrocket. The culprit? A native_modules.gradle script executing expensive node commands on every build.

Key Takeaways

Critical Insight

By caching the output of expensive node commands in the React Native build process, Swiggy reduced Gradle configuration time by 86% (from 1m 26s to 12s).

The modified native_modules.gradle script is available as a gist, and the caching strategy could work for any hybrid app dealing with similar build bottlenecks.

Recent from Swiggy

Related Articles