The Xcode Build optimizations that work for me

Scott
2 min readJul 14, 2020

--

  1. You can set your build settings so that when you run the compiler it runs one job with all required sources files instead of one job for every source file. This does reduce parallelism but significantly reduces duplicated work hence making your build time faster. To implement this you add -Onone only in the debug configuration of Other Swift Flags under your build settings. You will also need to set Optimisation Level to Fast, Whole Module Optimization in your debug build settings. Whatever is the fastest.
  2. Open Activity Monitor.
Double Click Source Kit Service.

Go to terminal and delete all files in this folder path:

rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache/*

3. Delete huge arrays, or save them to the keychain so the compiler doesn’t have to go through it.

--

--

No responses yet