- 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 ofOther Swift Flags
under your build settings. You will also need to setOptimisation Level
toFast, Whole Module Optimization
in your debug build settings. Whatever is the fastest. - Open Activity Monitor.
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.