Xcode 7 is very slow

I just downloaded and installed it yesterday, and it is so slow, development has pretty much ceased.


It takes several seconds just to switch editor panes. If I click on a file, to change to another file, it can take many seconds. Furthermore, it seems that the indexing spinner comes on constantly.


I removed all my DerivedData from Xcode 6, and opened a single, very small, project using ObjectiveC only.


I opened instruments, and loaded Xcode, then waited. After a while, Xcode "hung" on me again... I clicked on a file to change files, and it just never responded. Here is a link to the instuments trace.


http://i.stack.imgur.com/vyuXv.png


I've heard of people having performance issues, but I've never experienced something like this, even with an extremely large project, so I'm at a loss as to what I can do here.


Thanks!

Replies

Same thing - as soon as my mouse pointer passes over a file with a truncated name in the left-hand pane, the spinning wheel appears and everything stops for ages. Expanding the left pane so that the names are not truncated has fixed it. Looking forward to a proper fix from Apple.

I noticed the very same issue - Xcode's Interface Buiilder becomes very slow, almost non-responsive, after opening a storyboard file on an external monitor. On the internal retina one it works just fine.

Are you using an external monitor?


Storyboard editing can be *very* slow if Xcode is displayed on an external monitor.

Move Xcode to your Mac's integral display and performance will be fine.


Not a solution but at least a work-around.

My MacBook has retina display and the problem was that when I put the Xcode to the external display (HP LP2475w) everything else worked fine except when I started on viewing/editing my storyboard the Xcode became very unresponsive and slow. The solution I finally figured out was to install SwitchResX app and change the external display resolution to one of the HiDPI resolutions (my MacBook has HiDPI resolution selected) -> Xcode works fine now even on external display.

I'm working on a non-retina, Mid-2012 MBPro (16GB, 512GB SSD) and have been experiencing 30+ seconds of beachball action every time I interact with the storyboard. Along the lines of your suggestion, I toggled my screen resolution from the default to scaled to the same default 1440x900 resolution in System Preferences, and that seems to have helped. Still getting hesitation when going back and forth to the storyboard, but now only 3-5 seconds of delay.

7.3.1 really helped to resolve my speed issue.

Confirm. Version 7.3.1 finally made it possible to work again.

You could also try going into Window -> Project. And deleting all the old derived Data. This could help......But the newest Xcode has definitely sped things up.

Also if you have a LOT of code in a single file, you can break it up using Swift Extensions. Both of these strategies greatly sped things up for me, but with 7.3.1 Everyting looks peachy once again!

I can slow Xcode (7.3.1) to a crawl with a minimum number of steps. Maybe this will provide the clue that Apple's developers can use to fix the problem. In the mean time you can search for similar things in your code that you may be able to rework to avoid Xcode's serious problem.


1. Create a new project (I chose iOS Single View Application)

2. Insert the following code anywhere (e.g. a global variable in AppDelegate.swift or ViewController.swift)

let digits = [

1: [ [12, 13, 14, 15], [8, 9, 10, 11], [4, 5, 6, 7], [0, 1, 2, 3] ],

2: [ [9, 10, 11], [6, 7, 8], [3, 4, 5], [0, 1, 2] ],

3: [ [7, 8, 9], [4, 5, 6], [1, 2, 3], [0] ],

4: [ [7, 8], [4, 5, 6], [1, 2, 3], [0] ],

5: [ [4, 5, 6, 7], [0, 1, 2, 3 ] ],

6: [ [4, 5, 6],[1, 2, 3], [0] ],

7: [ [0, 1] ]

]

3. Run the project. It takes an excessive time to build (90 seconds for me).


4. Remove or comment out any three lines, Clean, and run again. Now it builds and runs in just a few seconds.

5. Restore those three lines, and then duplicate them to add three more. Change their indexes to make the code valid. Now it takes many minutes to build (more than 17 minutes for me).


Please Apple, would you consider looking at this test under your microscopes?

Your best bet to have Apple see that info is to submit a bug report ("Report Bugs" link at the bottom of any page here).

I stumbled upon this issue today.

The external monitor setup with HDMI cable has the problem, with Thunderbolt 2 adapter to DVI has no problem.

I suppose the answer to solve the problem might be making sure the connection cable is a good one.

It seems the cable doesn't solves the problem.


The reason might be left with the external monitor.


It might be that Xcode makes layout calculations that are a bottleneck to the laptop's resources (I've got the latest Mac Book Pro at this moment).


So the workaround is to be sure the monitor works well with your Mac or to move Xcode tot the laptop's screen.

Xcode 7.3.1, El Capitan here. Absolutely abominable performance and we can barely work any more. Extremely dissapointed that Apple destroys their own hardware with each upgrade expecting us to return. Sorry to say, not this time.

If your mac os is sync with iCloud just turn off the iCloud from the settings right now. It really helped me.

I started to use Xcode 8.3 under Sierra and builds took forever. However, I noted one response above suggesting turning off source control. This immediately allowed builds to complete within a few seconds rather than many minutes. I am guessing that source control is not configured correctly but that is an issue for another time. Great when you find a remedy on first search.