Gojek Sanju Naik Mar 15, 2020

Reducing Our Build Time by 50%

Article Summary

Gojek's iOS team was bleeding 11 minutes per build. 100 engineers, 350 daily CI pipelines, and a productivity crisis that demanded action.

The Gojek engineering team tackled their massive iOS build time problem using XCLogParser to analyze build logs, a custom Slack workflow for real-time developer feedback, and deep debugging of Xcode's build system. Their multi-repo setup with 40+ submodules made the challenge even harder.

Key Takeaways

Critical Insight

Three Xcode configuration fixes (recursive search paths, inconsistent scheme settings, and CocoaPods loading) delivered a 50% build time reduction and 60 hours saved weekly.

The article reveals the specific compiler flags and debugging techniques they used to uncover these hidden build system issues.

About This Article

Problem

Gojek's iOS codebase has over 40 submodules with inconsistent build settings across schemes. When developers switched between the main Gojek-Integration scheme and module-specific ones like Launchpad, it triggered unnecessary rebuilds.

Solution

Sanju Naik's team analyzed ModuleName_vers.c files to debug compiler inputs. They found that the Launchpad scheme was missing code coverage flags. After syncing build settings across all Xcode projects in the workspace, the inconsistencies were resolved.

Impact

Switching between schemes now takes 2 minutes instead of 13 minutes, an 80% improvement. Enabling gather coverage for all schemes also stopped redundant recompilation across dependent modules.