XCode 13 is super slow, build time is 10~20 times longer than Xcode 12

XCode 13 is super slow, build time is 10~20 times longer than Xcode 12。The worst release ever.

New Build System

Seeing the same behavior with Xcode 13 GM. My project will not finish compiling and doesn't show any errors. If I stop the build I see "Command CompileSwiftSources failed with a nonzero exit code"

To speed up your builds, ensure that your project is optimally configured:

The Xcode Release Notes have been advising moving to the new build system for several releases. If you were still on the legacy build system, it has been removed from Xcode 13, so you are now using the new build system. This build system is faster than the legacy build system, enabling better parallelization of build tasks, but if your project isn't embracing the best practices from those documentation articles, like not correctly declaring build dependencies, you will not see the full performance benefits.

I narrowed this issue down to a single SwiftUI file that causes the problem. When I remove this file the build completes in under 2 minutes. There is a simple code fix for this issue by moving about 10 lines of code into a view it seems to solve it.

I submitted the Xcode project using feedback assistant. The code is too long to post here. I am working on reducing the code down so I can post it once I get to that point.

Yes I am not seeing any incremental builds with 13.2, always seems to do full recompiles now. I don't think 13.1 was this bad! What a nuisance.

I started to experience slow incremental builds after setting the defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1. Once I set it back to 0, restarted Xcode and removed derived data all is looking good. Will take a closer look later what is the actual issue when it's set to 1.

I'm seeing the same issues particularly on Intel CPUs. Is this some game where M1 CPUs will be optimized and Intel won't? Xcode has always been a ****** IDE honestly compared to other options in the world, but it's getting to the point of unusable.

I shouldn't have to start building apps in React Native just to get apps done because of IDE issues, but I'm sure considering it.

@adamglo

Did that manage to fix things for you? I'm sitting here waiting 3-4 minutes every time I make a minor text change and it's killing me.

I'm having the same issue since upgrading to Xcode v. 13.2.1 (13C100). Build times for super simple SwiftUI project with one view around 2-7 minutes. It's a brand new MBP Apple Silicon.

Version 13.3 (13E113) is worse! Can someone please look into this issue? Build times are 30 minutes for me.

update macOS to 12.3.1 (21E258), and open xcode, xcode will prompt you to reinstall the xcode debug tool, after this, I feel it is a little faster than before.

Same here macOS 12.3.1 and Xcode 13.3 one line change is taking a lot of time

It's a shame, Xcode has been degrading step by step in performance with each new version since the departure of Steve Jobs, coming now to the point of unusability. Steve, come back, help!

I can confirm that running defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1 in M1Max 64GB made builds WAY slower. Rebuild code went from 3-10s to build to +30s! On every rebuild, even with no code changes.

I find things get faster and "smoother" after I disabled the Source Control in the Preferences...

Well we have fixed our slow build issues by finding out expressions and functions which are taking more time compiling found out critical bottlenecks for slow build time now everything is fast clean build time is reduced from 35 minutes to 206 seconds.

I'm using XCode 13.4 on macOS 12.4, M1 Pro chip. Building a react native project takes around 10 minutes. Indexing is paused for a long time. Building the debug variant is very fast, but the release variant is pure horror.

Does anyone have any tips about how to check which parts of the code are slower to compile?

I Apple slowing down the macs on purpose for the new M1...? What the heck is going on? XCode 13.4 is super slow!

What worked for me is disabling "Open using Rosetta" checkbox - to me it looks like latest xCode or xOS is very slow using Rosetta. With Rosetta it took me 15800 seconds without it was only 505 seconds

Yep, Xcode 13.3.1 took my time up to 30 minutes when archiving an app.

Still facing same problem with Xcode 14.2. Apple having a f**k IDE :(

XCode 13 is super slow, build time is 10~20 times longer than Xcode 12
 
 
Q