Improve build performance with Xcode build settings and deterministic SPM pins#216
Open
AvdLee wants to merge 1 commit intogluonfield:mainfrom
Open
Improve build performance with Xcode build settings and deterministic SPM pins#216AvdLee wants to merge 1 commit intogluonfield:mainfrom
AvdLee wants to merge 1 commit intogluonfield:mainfrom
Conversation
… SPM pins Enable recommended Xcode build settings and pin branch-tracked SPM dependencies to specific revisions for deterministic builds. Changes: - Enable 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. - Enable EAGER_LINKING = YES (Debug): allows the linker to start before all compilation tasks finish, reducing wall-clock build time. - Pin Magnet, Splash, and OllamaKit from branch tracking to specific commit revisions: eliminates non-deterministic SPM resolution and avoids unnecessary re-fetches when upstream branches move. Benchmark (Xcode 26.2, Apple Silicon): - Clean build: 19.4s → 19.1s - Zero-change: 2.5s → 2.5s The compilation cache benefit is most significant during real developer workflows (branch switching, incremental builds after pulling changes) rather than clean-build benchmarks, where the cache is cold.
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 and pins branch-tracked SPM dependencies to specific revisions for faster, more deterministic builds.
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.main/master) to specific commit revisions: Eliminates non-deterministic SPM resolution and avoids unnecessary re-fetches when upstream branches move.Benchmark (Xcode 26.2, Apple Silicon)
How these were found
Analysis was performed using Xcode Build Optimization Agent Skills (not yet available, happy to invite to the private repo!), which benchmarks builds, audits project settings against best practices, and identifies optimization opportunities.
Test plan