Gizmodo Gizmodo - 3 years ago 121
Swift Question

Xcode 8.3 Indexing & Building Extremely Slow

I am posting this after reading many similar posts on here regarding this issue and none of the solutions that worked for other people not working...


  • Xcode Version 8.3.3 (8E3004b)

  • Swift 3.1






Things I tried


  • Deleting Derived Data folder

  • Deleting Workspace File

  • Cleaning Build Folder

  • Cleaning Build

  • Reinstalled Xcode (after complete removal)



I also looked for Swift Issues:


  • Removed all concatenating strings

  • Cleaned up Swift arrays and dictionaries

  • Added Whole module optimizations






This all started happening after last Xcode update of 8.3.3. My project was compiling within seconds and now I have to wait at least 15 mins for it to index, then 5 minutes to compile after everything I change even something small in code.

When Building, it get stuck in "Compiling Swift source files". Is there way for me to look in to where it is actually getting stuck?

Answer Source

Apple knows about this problem, and says that Xcode 9 beta will perform much better. Note that if you don't want to update to Swift 4, you can continue compiling in Swift 3 mode using Xcode 9. The big limitation is that you won't be able to submit your project to the App Store until Xcode 9 goes final.

If you don't want to update to Xcode 9 beta, you will just have to do a binary search: comment out all your code and start adding it back, piece by piece, until you find that piece that's causing the trouble.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download