Why Clean Build, not incremental compile
Day to day, one Swift file change recompiles only affected modules—maybe tens of seconds. Incremental builds depend heavily on cache; DerivedData from machine A is useless on B. These scenarios force a from-scratch build:
- CI job clears DerivedData on every start
- Xcode or macOS upgrade invalidates old cache
- New dev machine with no historical cache
- run
xcodebuild clean buildorxcodebuild archiveRelease packaging
So clean build time is the real bar for "can this machine carry an iOS build pipeline." Incremental speed reflects developer habits and edit frequency more than hardware ceiling. All data here is full clean build, same starting line for all three machines.
Test environment and project setup
Same project, same Xcode, similar room temp; three independent rounds per machine, median reported.
Each round: rm -rf ~/Library/Developer/Xcode/DerivedData
for a true from-scratch compile.
Test project: mid-size SwiftUI app, ~92k lines Swift, 2 Extension targets (WidgetKit + Share Extension), ~5,800 Swift files, ~12 local Swift Packages.
Xcode version: Xcode 16.4, macOS 15.5 Sequoia (same on all three machines).
Test rounds: 3 clean builds + 3 Archives per machine, median taken. Clean build: xcodebuild clean build -scheme AppName -destination generic/platform=iOS; Archive: xcodebuild clean archive -scheme AppName -archivePath /tmp/app.xcarchive.
Hardware: ① MacBook Air M2 (2022) · 8-core CPU · 16 GB unified memory · 256 GB SSD; ② MacBook Pro 14" M1 Pro (2021) · 10-core CPU · 16 GB unified memory · 512 GB SSD; ③ VPSRox dedicated Mac mini M4 (2024) · 10-core CPU (4 performance + 6 efficiency) · 16 GB unified memory · 256 GB NVMe SSD · datacenter (Hong Kong node).
MacBook Air M2 is 8-core (most common config), not 10-core top trim. MacBook Pro M1 Pro and VPSRox M4 Mini are 10-core to compare generations (M1 Pro vs M4) and cooling under sustained builds.
Clean Build full compile timing
Table shows median wall-clock time over three clean builds, peak memory pressure, and peak CPU from Xcode.
Memory peaks sampled with memory_pressure and Activity Monitor during builds.
| Machine | CPU | Clean Build median | Peak memory | Run 3 vs run 1 delta |
|---|---|---|---|---|
| MacBook Air M2 (8-core) | 8-core M2 | 5m 42s | 11.8 GB (occasional light swap) | +38s (clear thermal throttling) |
| MacBook Pro 14" M1 Pro (10-core) | 10-core M1 Pro | 4m 08s | 10.9 GB (no swap) | +14s (mild thermal throttling) |
| VPSRox Mac mini M4 (10-core) | 10-core M4 | 3m 11s | 9.4 GB (no swap) | +2s (negligible drift) |
Watch the "run 3 vs run 1" column. MacBook Air run 3 was 38s slower than run 1— fanless passive cooling triggered thermal downclock after back-to-back builds. MacBook Pro narrowed to 14s but still drifted. VPSRox M4 Mini in a datacenter rack: only 2s across three runs, within measurement noise.
For a single build, MacBook Pro M1 Pro looks great. In CI you care about the 10th or 50th consecutive build, not the first. Cooling gaps multiply here.
Archive pipeline time comparison
Archive is closer to production than a plain clean build: beyond compile it does code signing, bitcode (if enabled), dSYM generation, and symbol packaging. On the same project, Archive usually takes 1.2–1.4× clean build time.
| Machine | Archive median | Increase vs Clean Build | 5-run average (estimated) |
|---|---|---|---|
| MacBook Air M2 (8-core) | 7m 18s | +1m 36s | ~8m 40s (thermal drag) |
| MacBook Pro 14" M1 Pro (10-core) | 5m 22s | +1m 14s | ~5m 45s |
| VPSRox Mac mini M4 (10-core) | 4m 06s | +55s | ~4m 10s (very stable) |
Archive data shows M4's edge is especially clear in dSYM and symbol work— ~19% faster than M1 Pro, not just linear clock speed. Tied to M4 memory bandwidth and Neural Engine assist.
With Fastlane, each fastlane gym is full Archive + export—
~5m 30s on M4 Mini vs ~10 minutes on MacBook Air M2.
Multiple daily flavors (dev/staging/production) makes that gap hit release cadence.
Thermal throttling and memory pressure: hidden variables on local Macs
Many benchmarks report one cold run and ignore thermal accumulation. Apple Silicon throttles CPU/GPU when chassis temp exceeds limits until cooling catches up. Fanless MacBook Air feels this most.
Thermal throttling on MacBook Air M2
MacBook Air M2 bottom case was noticeably hot after the second clean build (~11 minutes in).
pmset -g thermlog showed CPU_Speed_Limit drop from 100 to ~78;
run 3 was 30s+ slower than run 1. Back-to-back CI on MacBook Air runs
15%–30% slower than cold start and is hard to predict.
Active cooling limits on MacBook Pro M1 Pro
MacBook Pro active cooling helps a lot but is not immune. Above ~28°C indoors, or with multiple Simulators, mild throttling can appear. Our 14s delta came from a warmer third run; at 22°C controlled room it shrank to ~8s.
Thermal stability in datacenter
VPSRox nodes sit in climate-controlled racks (~18–22°C); Mac mini M4 has active cooling. Build time consistency beats any laptop. In our three runs, run 1 vs run 3 differed by 2s—negligible. For CI with predictable windows, you can plan on p99 instead of fearing surprise timeouts.
MacBook Air by a sunny window above ~27°C room temp throttles earlier and harder. Same machine in winter can be 20%–30% faster. Benchmark your real environment, not a climate-controlled review lab.
How peak memory and swap writes affect speed
On 16 GB unified memory, large iOS builds create real memory pressure.
Xcode spawns multiple tools at link and sign time; Swift compiler is memory-heavy.
We cross-checked peaks with vm_stat and memory_pressure.
MacBook Air M2 peaked ~11.8 GB during clean build; brief swap (~200–400 MB) when both Extension targets compiled in parallel—SSD speed then affects compile progress. MacBook Pro M1 Pro ~10.9 GB peak, no swap in three runs, thanks to tighter memory scheduling. VPSRox M4 Mini ~9.4 GB peak—M4 uses fewer copies and intermediates for the same job.
| Machine | Peak memory | Swap triggered? | Peak CPU during compile | SSD writes (Clean Build) |
|---|---|---|---|---|
| MacBook Air M2 | 11.8 GB | Yes (~300 MB) | ~780% (~8 cores saturated) | ~4.2 GB |
| MacBook Pro M1 Pro | 10.9 GB | No | ~980% (near 10-core saturation) | ~3.8 GB |
| VPSRox Mac mini M4 | 9.4 GB | No | ~960% (near 10-core saturation) | ~3.5 GB |
For larger codebases (>200k lines) or heavier Swift Package graphs, 16 GB on MacBook Air hits memory limits sooner. VPSRox offers SSD add-ons (+1TB $2.6/day, +2TB $5.2/day) but not >16 GB RAM yet— plan ahead.
When a local MacBook is still enough
Not every team needs a cloud node. Your MacBook is fine when:
- Smaller project (< 30k lines Swift): clean build finishes in under 2 minutes on any Apple Silicon MacBook—no bottleneck.
- Low CI frequency (< 5 builds/day): even at 7–8 minutes per clean build, daily total stays under 40 minutes—acceptable.
- Solo indie dev, mostly local debugging: incremental builds cover most days; clean build only for releases—MacBook Pro M1 Pro and up are fine.
- MacBook Pro M3/M4 users: latest MacBook Pro (M4 Max) cooling and performance are close to Mac mini M4; gap is sustained-build stability, not single-run speed.
Seriously consider cloud nodes when: CI triggers > 20 builds/day, the team shares one build environment (avoid "works on my machine"), developers on MacBook Air with a growing codebase, or you need isolated builds for multiple projects.
Bottom line: how to weigh cost vs. benefit
Cloud Mac cost is obvious: VPSRox dedicated Mac mini M4 is $21.8/day, ~$109.1/month continuous—cheaper than a new MacBook Pro, but ongoing spend. What do you save?
Example 5-person iOS team: ~30 clean build/Archive runs/day, ~8 minutes each on MacBook Air M2 (with mild throttling) = 240 minutes. Same work on VPSRox M4 Mini ~123 minutes. ~117 machine-minutes saved daily; with parallel CI branches that becomes faster review feedback and release windows.
Hidden cost: attention while waiting. Under ~5 minutes many watch the progress bar; past ~8 minutes they switch tasks and forget to return. Flow research suggests ~20 minutes to regain deep focus after an interruption. ~$109/month node cost can be "focus insurance," not just server rent.
When cloud nodes make sense: codebase > 50k lines + MacBook Air + CI > 15 builds/day—all three together.
Upgrade local Mac first: mostly local debugging (not CI) + medium-sized project + tight budget—a MacBook Pro M4 may beat renting cloud.
Complementary setup: local MacBook for daily incremental builds and debugging; CI on a dedicated cloud node—clear split, no interference.
Replace thermally unstable local Mac with cloud M4
VPSRox offers datacenter-hosted dedicated Mac mini M4 nodes—no thermal throttling, full physical machine exclusivity, daily rental with no contract. Provisions in 1–5 minutes; five global nodes.