Thursday, September 12, 2024

Swift Build Times and Module Verification

Paulo Andrade:

Secrets’ build time must have gotten slower and slower without me really noticing it… until Xcode’s 16 betas, where I felt I really needed to understand what was going on.

[…]

The compiler is clearly spending most of the 3.5 minutes it took to build Secrets on verifying modules[…] This all sounds good and dandy, especially if you’re distributing a framework, but I clearly don’t want to be doing this in Secrets on every build!

[…]

This tweak brought down the build time from 3.5 minutes to 52 seconds 😮!

Previously:

Update (2025-05-23): Marcel Weiher:

Well that was 10 seconds of checking well spent: recently, builds of my apps started to take ~30 seconds after a 1 line change.

Without any Swift in sight!

Checked the build logs and it turns out that “verify modularization” phases for two new frameworks are 10-15s each!

1 Comment RSS · Twitter · Mastodon


Aren't frameworks an app launch time killer on macOS anyway, or did I misunderstood Jeff Johnson's article? https://lapcatsoftware.com/articles/2024/2/3.html (I'm no Apple app developer)

Yet they — and slow app launches — seem very common in crafty macOS apps.

Leave a Comment