My swift project is becoming unusable because of huge compiling time.
I'm on XCode 6.4, the project counts around 50 files plus a realm database and around 10 pods (alamofire, locksmith, SwiftyJSON, Facebook,...)
It takes around 20min to compile it from scratch. Adding a simple line takes at least 5min to compile and i realized that it recompiles ALL files even for one line of changes.
I'm sure it's not supposed to be like that.
What actions should i do to improve that ? What is the common parameters to have a fast build? How can i avoid all the files to be recompile for one single change?
I already tried common optimization parameters, like the ones suggested here : Why is Swift compile time so slow? but nothing helped me so far.
UPDATE
xctool run result (xctool -workspace MyApp.xcworkspace -scheme MyScheme -jobs 1 build
) :
- The app itself : 3730559ms (around 1h)
- The overall total (including pods and all) : 4662682ms (1h17min)
A single file takes between 20sec to 60sec on average
I need to test on another more powerful host, but anyway, smth is definitely wrong, and it didn't take that long a few days ago