Swiggy Dhruvil Patel Aug 23, 2022

Build Time Optimizations in Xcode

Article Summary

Swiggy's iOS team cut build times by 21% and saved developers hours of waiting. Here's their battle-tested playbook.

Dhruvil Patel from Swiggy's mobile team breaks down their systematic approach to tackling slow Xcode builds. They analyzed compilation bottlenecks, optimized code patterns, and tweaked build settings to dramatically improve developer productivity.

Key Takeaways

Critical Insight

A 21% build time reduction came from systematic measurement, targeted code improvements, and smart build setting adjustments.

The resourceRules.plist trick and specific compiler flags they used are surprisingly simple yet powerful.

About This Article

Problem

At Swiggy, Dhruvil Patel's team noticed that incremental builds were taking too long. Code signing operations were hashing resources unnecessarily, even when the code hadn't changed at all.

Solution

The team switched from SHA-256 hashing to the faster SHA-1 algorithm. They also created an empty resourceRules.plist file to cut down on the content that needed signature verification.

Impact

This code signing optimization cut incremental build times in half. It shows how focused changes to the build system can have real performance benefits.