11

My Xcode speed has come down to a crawl. I have no idea why. CPU activity is very low on both cores, gobs of memory.

It's almost as if it's waiting for something but I have no idea what. I have disconnected all USB and FireWire devices but it helped only a little bit.

Any ideas?

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
John Smith
  • 12,491
  • 18
  • 65
  • 111
  • 2
    use the `sample` command line tool to sample Xcode when it is slow. `sample Xcode 5` should do it. Then post the sample here. – bbum Oct 14 '10 at 04:01
  • I would suspect code sense, try rebuilding your index (in project settings), or turning index off (in xcode preferences). – ergosys Oct 14 '10 at 06:11
  • 1
    Press ⌘0 to bring up the Activity Viewer. Is it chewing on something? – Peter Hosey Oct 14 '10 at 07:49
  • @Peter Hosey. As I said, Activity monitor shows nothing. the standard gcc backend pieces are loaded but show no activity. They all seem to be waiting and I have no idea what for. – John Smith Oct 14 '10 at 13:33
  • John Smith: I didn't say Activity Monitor, I said Activity Viewer. Activity Monitor is a separate application and not what I was talking about. Activity Viewer is part of Xcode and what you should check next. – Peter Hosey Oct 14 '10 at 16:02
  • @Peter Hosey. Sorry I didn't know about it. All it's showing is which file is being compiled, but not much more insight (yet). – John Smith Oct 14 '10 at 17:05

6 Answers6

2

First thing I'd look at is the HDD. Is it constantly being accessed? If so, it would indicate several possible things - memory shortage and lots of swapping, hard drive free space shortage cause it to hunt for space, heavy fragementation etc.

If thats not it, perhaps Xcode is running something in the background. Do you have any custom scripts you have added which could have done something?

have you rebooted?

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
drekka
  • 20,957
  • 14
  • 79
  • 135
2

It sounds like you have predictive compilation turned on in the Xcode preferences.

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
2

I know this is a relatively old post, but I had a different problem that was causing XCode to be sluggish. I am running 4.1. If you navigate to your project file, secondary click and select "Show Package Contents", then delete the *.xcworkspace file, XCode speeds up drastically. No more rainbow pinwheel of death.

Jacob
  • 926
  • 1
  • 14
  • 25
  • I am really interested in this solution. Is it safe to delete that file in an Xcode 4.4 project ? No side effects whatsoever? – Mazyod Aug 31 '12 at 15:46
1

It may very well be downloading documentation updates. They're fairly large. Open Xcode's (note, big X, little c :-)) preferences and go to the documentation tab. I'll bet there's a circular progress indicator beside one of the doc sets.

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
0

If you have lots and lots of code (or at least 10 000++ lines of code), the predictive compilation setting gets a lot to do. Turn this off as mentioned and you've at least eliminated that variable.

PinkFloydRocks
  • 808
  • 3
  • 14
  • 29
0

For me, this just happened when I started editing a new file. It was caused by a single function -- something in that function caused the compiler to freak out. After 20 minutes of compiling, Xcode gave me that message.

So if something like this starts right when you start editing a file, try commenting out the problem areas and trying again.

Dominic Holmes
  • 581
  • 5
  • 13