nawerva.blogg.se

Xcode update slow
Xcode update slow






For our main target, it took 10 seconds to execute for every incremental build. I found out that most of our time was spent on executing SwiftLint. While writing this blog post I’ve been trying to improve the build times of the Collect by WeTransfer app which I built during my day to day job. It might be that some of our build phases aren’t required for debug builds and be configured to run for release builds only. Optimizing build phases is a great way to speed up Xcode builds. Yes – many commands, especially compilation, are able to run in parallel with each other, so multicore machines will finish the build much faster than the time it took to run each of the commands. I’ve asked Rick Ballard from the Xcode Build System team for a clarification which gave some great insights into how the system works: The above build took 107 seconds to succeed while compiling the Swift sources took 197 seconds. Let’s see how we can improve this! How can the duration of Compiling Swift Sources be longer than the total build time?īefore we dive into optimisations I want to point out that it could be that compiling the Swift sources turns out to take longer than the total build time. The Phase Script execution is the interesting part as that takes most of the time. These are the plain tasks that run every time you do a single change.

#XCODE UPDATE SLOW CODE#

In this example, we didn’t touch any code and we directly run the Build with Timing Summary action again. A Build Timing Summary for an incremental build. In other words: we don’t have to optimise that part as we mainly want to focus on improving the biggest part of performance which comes down to incremental builds. It’s worth executing the action directly again as that will result in a different Build Timing Summary, not including the asset generation categories. Note that I did a clean build here which is different compared to doing an incremental build. Improving compile times for your Swift code might not be so easy but we can have a look at improving compile times for our build phases. This is a great starting point for investigating where you should improve your project.Īs you can see, most of the time is spent on CompileSwiftSources, PhaseScriptExecution, and asset-related tasks. An example build performance analysis in the Build Timing Summary.






Xcode update slow