Tokopedia Oscar Yuandinata

How Tokopedia Achieved 1000% Faster iOS Build Time

Article Summary

Tokopedia's iOS team turned 90-minute builds into 5 minutes. Yes, you read that right: a 1000% improvement.

Indonesia's largest e-commerce platform was drowning in build times that killed productivity. With 40 developers and a weekly release cycle, their CI queues became a nightmare. Here's how they escaped.

Key Takeaways

Critical Insight

Tokopedia reduced iOS build times from 50+ minutes to under 5 minutes by switching to Bazel with remote caching.

Continue reading

What This Article Covers

Problem

Tokopedia's iOS developers were stuck with 50-minute clean builds on their local machines and 30-50 minute builds in CI. With 40 developers working on 5 features at once and a weekly release cycle, queue delays became a real bottleneck.

Solution

Oscar Yuandinata's team built a custom generator that automatically converted Cocoapods dependencies into Bazel rules. They also forked Bazel to handle mixed Objective-C and Swift compilation, adding flags like --spawn_strategy=local and --features=swift.use_global_module_cache to make it work.

Impact

After switching to Bazel, CI builds got 5 times faster. Adding remote caching on top of that doubled the improvement again, bringing typical build times down from over 50 minutes to under 5 minutes. Dependencies that hadn't changed didn't get rebuilt.

The team had to disable a key Bazel safety feature to unlock the real performance gains, and they explain exactly why.

This page summarizes “How Tokopedia Achieved 1000% Faster iOS Build Time” by Tokopedia, published Nov 16, 2021. All credit for the original work goes to the authors.

Read the original on medium.com (opens in new tab)

AI tools for iOS

Browse all AI tools →