Xcode & Simulator slow on launch

I'm having a very annoying issue with my MBP and Xcode which I'm struggling to find a solution for.

I have a 2017 13" MBP which is taking 5+ minutes to launch Xcode, even to a basic blank SwiftUI application. Upon launching the simulator (or even preview), I am seeing times of up to 10 minutes before the application/screen has appeared on the simulator.

RAM does not seem to be an issue, as there is plenty still available, but I see the CPU maxed out throughout the entire process.

I found that a reboot would sometimes improve these durations, but not by any significant amounts.

Once Xcode has launched, and the simulator is finally loaded, I can use the app fine. It only takes a few seconds to build and push updates to the simulator each time.

It's mainly this initial launch that is causing my problem. During this time, the CPU is maxed out, and all other windows become non-responsive until the load has completed.

I bought the MBP in 2018, and whilst I admit its now a few years old, I would not expect such poor performance from a relatively new piece of kit.

I'm using Big Sur (11.4) and Xcode 12.5.1.

I created a separate partition and started fresh, and the issue remains, so I don't believe it's an issue with the Xcode installation itself.

Any ideas of places I can start to look?

**Spec: **

MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports) 3.1 GHz Dual-Core Intel Core i5 8 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB

Answered by Claude31 in 681567022

8GB RAM is now a bit limited for Xcode.

Could you monitor disk and memory use during launch, to see if you hit the 8 GB limit and swap to disk ?

If not, try to reinstall Xcode.

How much RAM ? How much disk space available ?

Is it since you moved to Xcode 12.5.1 ? Or did it occur before ?

200+ GB free disk space 8GB of RAM total, with approx 6GB used.

Accepted Answer

8GB RAM is now a bit limited for Xcode.

Could you monitor disk and memory use during launch, to see if you hit the 8 GB limit and swap to disk ?

If not, try to reinstall Xcode.

Xcode & Simulator slow on launch
 
 
Q