Hi,
We’ve been exploring the Explicitly Built Modules
feature introduced in WWDC 2024 to understand its impact on build times.
Observation:
Enabling the feature resulted in a significant build time regression. Despite aligning macros, language versions, and settings as per the guidance, the regression persists.
Below are our benchmarks for reference:
Setup:
- Identical dependency graph and project setup.
- Unified configurations across all targets to prevent compilation of multiple module variants(e.g., UIKit) as highlighted in the WWDC session.
- XC Result bundles and reproducers are enclosed in this fb.
- Xcode 16.1, Tuist version: 4.20.0, WMO, Apple M3 Max, macOS 15.2, 64GB
- benchmark script and other setup details in the reproducers enclosed.
- Reproducer(without result bundles but they can be generated locally via ./benchmark.sh): GitHub - chiragramani/ExplicitlyBuildModulesRegressionRepro: Explicitly Build Modules Regression Repro
Benchmarks:
Without Explicitly Built Modules | With Explicitly Built Modules | Regression | |
---|---|---|---|
Run 1 | 149.1 seconds | 2595 seconds | 1639.4% |
Run 2 | 150.7 seconds | 2481 seconds | 1545.8% |
Run 3 | 151.6 seconds | 2524 seconds | 1565.1% |
Avg | 1576.8% |
Based on the Xcode settings, it appears that this feature is still in an experimental stage. The objective of this thread is to understand any challenges others may have encountered with explicit module maps and to share/learn about potential workarounds. These insights will help us refine and optimize our setup effectively.
If we’ve missed any considerations for optimizing this setup, please let us know! Looking forward to insights from the community.