Enable compilation caching and eager linking for faster builds#2808
Open
AvdLee wants to merge 1 commit intokickstarter:mainfrom
Open
Enable compilation caching and eager linking for faster builds#2808AvdLee wants to merge 1 commit intokickstarter:mainfrom
AvdLee wants to merge 1 commit intokickstarter:mainfrom
Conversation
Enable recommended Xcode build settings to improve build performance: - COMPILATION_CACHING = YES (Debug + Release): caches compilation results so repeated builds of unchanged sources are served from cache. Benefits branch switching, pulling changes, and CI builds. - EAGER_LINKING = YES (Debug): allows the linker to start before all compilation tasks finish, reducing wall-clock build time. Benchmark (Xcode 26.2, Apple Silicon, 1,991 Swift files): - Clean build: 83.4s → 83.5s (within noise) - Cached clean: 83.1s (warm compilation cache) - Zero-change: 10.9s → 10.6s The compilation cache benefit is most significant during real developer workflows (branch switching, incremental builds after pulling) rather than clean-build benchmarks where the cache starts cold each run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enables recommended Xcode build settings to improve build performance for the Kickstarter iOS app.
Changes
COMPILATION_CACHING = YES(Debug + Release): Caches compilation results so repeated builds of unchanged sources are served from cache. The biggest wins come from branch switching, pulling changes, and CI builds where many files remain unchanged between builds.EAGER_LINKING = YES(Debug): Allows the linker to start work before all compilation tasks finish, reducing wall-clock build time during development.Benchmark (Xcode 26.2, Apple Silicon, 1,991 Swift files)
Clean build times are within noise (the cache population overhead matches the cache benefit in a cold-cache benchmark). The real benefit manifests during developer workflows where the cache persists: branch switching, incremental builds after pulling, and CI with persistent DerivedData.
How these were found
Analysis was performed using Xcode Build Optimization Agent Skills, which benchmarks builds, audits project settings against best practices, and identifies optimization opportunities.
Side note
While setting up the OSS build, I noticed
Secrets.Statsigis referenced inAppDelegate.swiftbut not stubbed inConfigs/Secrets.swift.example. This causes a compile error for open-source contributors. You may want to add a stub to the example file.Test plan
xcodebuild -showBuildSettings