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

For me the issue was XCode being stuck on indexing. After deleting the derived data of the project indexing finished and XCode became responsive again.


EDIT:
Unfortunately this is only a temporary solution. XCode will eventually get stuck again while indexing. I hope this will be fixed soon, XCode is almost unusable currently.

So, I never could make any headway. Xcode 7 kept spinning and spinning. I sent in spindups, instrument logs, console logs of all the many thousands of errors xcode was spitting out.


I was running Yosemite.


In the end, I executed a clean install of El Capitan, and aside from issues related to El Capitan, I have seen no problems like I experienced before. Xcode is still slow, but nothing like it was previously where it would just go away for minutes at a time.


I have recovered all my applications and such from Time Machine, so I have pretty much the same stuff (except I didn't re-install mousepose).

I had the same issue and was able to fix the slowness by going into the projects window (from the Window menu) and delete the derived data from my project.

I eventually fixed this by zapping the DerivedData folder and turning of code coverage. I wrote a detailed answer on my blogpost here. Basically I did the same thing as you by hooking it up with instruments but I dug deeper and isolated the action that was making it slow. https://meetzaki.wordpress.com/2015/10/21/how-i-investigated-an-xcode-slow-down/

I'm having same problem with XCode 7.1 on a Mac Pro Late 2013 with 8 Core CPU, 64GB Ram and 1TB SSD running Yosemite 10.10.5. Navigating through xib files, selecting one by one makes this XCode freeze become faster. While this freeze, only XCode freezes I can use other apps, so this is exactly not a OS X freeze. XCode 6.4 doesn't have any problem like this. I tried disabling and enabling I disabled Source Control as XyeKi suggest, but this didn't help. Any working workarounds to solve this problem would be appriciated!

This helped me with a slow xcode:


How to disable indexing

Open the Terminal window , then type the following code in terminal and click enter.

defaults write com.apple.dt.XCode IDEIndexDisable 1

Now restart your xcode and enjoy better performance.

I have the same problem -- Xcode7.0 first opened very slowly in the open Mac, required 4~5 mins after it can be work. the simulater also extremly slow.(MacbookPro Retina 2014 , OSX EI 10.11.0 and 10.11.1). we need apple engineer help me to solve the Bug! why apple software increasingly unstable?

I'm an super apple fan and think Jobs hate such unstable system! if you have a good solve method, please tell me I'am very grateful for you! My Email: zpyxxlove@163.com

See my reply.

It worked for me.

I had found the solve method, I remove the unsupported third-party plug-ins then rebot, everything be OK! thank Apple engineer!

more about detail in my blog http://www.jianshu.com/p/608803eb1e12

XCode is horrible since version 7.

Notice that it is getting slow over time. It seems like they are chaching some of the tabs while navigating through the tabs or w.e.
The only way to speed it up is to restart it once you notice that it is getting slow (approx. every 10 minutes).


Cheers

Would like to add that I've also noticed my Xcode 7 lag is simply due to the tooltips showing up on the left navigation pane. I've noticed this on three different machines (MBP Mid 2012, MBP Mid 2014, iMac Late 2012). I'm on the latest version of Xcode as of this posting (7.1.1).


My only solution so far is to expand it so that no file names/folders get truncated. This is quite annoying and was not an issue with Xcode 6.4.

The same problem (and "solution") with Xcode 6.4 on Yosemite here...

Hi,


i had the same issue (Xcode 7.1.1) - removing the follwing folder and file fixed the problem here:


rm -rf ~/Library/Developer/ ~/Library/Preferences/com.apple.dt.Xcode.plist


Best


Alex

> 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.


Xcode 7 on my late 2012 MBP Retina spends about a second (non-scientific) switching between open file tabs. I instrumented it and found that Xcode is spending a lot of time laying out the UI for the file tree / Project Navigator. Sure enough, when I hide the navigator [cmd-0] or switch to a less expensive nagivator, like Find, switching between open files becomes nearly instantaneous.


As an additional test, I tried showing the project navigator in each editor pane but with the tree fully collapsed. Again, the file-switch time becomes nearly instantaneous, so it seems the lag is proportional to the number of items expanded - or perhaps just visible - in the tree.


P.S. I tried some of the other solutions mentioned in this thread, like nuking derived data, disabling source control, and disabling code coverage, but these didn't appear to have any effect on file-switch times. It seems likely that people are experiencing several, non-related performance issues.

For me (El Capitan 10.11.1, XCode 7.1.1, MBP 2015 *****) happens when editing a storyboard on any external monitor (running two of them: 1920x1200 and 2560x1440). After switching to storyboard it becomes extremly/unusably slow. If I swtich away from storyboard it works fine - obvious a problem with the storyboard designer. It works fine on laptop's retina display.

I'm also flabbergasted that Apple can't repro this issue.