2

My Xcode compiles are taking longer and longer.

Each time I compile it claims it's compiling one file in the Activity window even though I would not have editede it and it has no dependence on the files I'm editing. In the Build window it claims it's compiling another file (the right one).

I have tried cleaning, precompiled headers are in place etc..

This is Xcode 3.2.2

Why is this happening?

Abizern
  • 146,289
  • 39
  • 203
  • 257
John Smith
  • 12,491
  • 18
  • 65
  • 111

4 Answers4

1

I had a similar problem and I tracked it down to a choppy/really slow Internet connection. Disabling the internet connection by shutting off the wi-fi would make the compiling fast again. The final solution was to stop using my neighbour's wifi and get my own (<- Joke ... not really ... jaja :/)

I'm not sure what is XCode doing over the Internet connection, but with a poor connection some sort of timeout seemed make the building process VERY slow.

This may not be your problem but it is easy enough to test. Cheers!

fsaint
  • 8,759
  • 3
  • 36
  • 48
  • Even if that's a problem I will have a bigger problem to deal with. Does apple expect me to code without internet access like in a job test? – John Smith Jan 06 '11 at 15:55
  • To my experience with Internet and without Internet is fine. The problems I experienced was bad access. My poor connection made the computer believe it had Internet access but connections would timeout frequently. – fsaint Jan 06 '11 at 16:11
  • 1
    Big question is why Xcode is sending data over the internet when you're compiling something. – Kalle Jan 06 '11 at 17:55
  • 1
    XCode supports distributed compilation so it could be the process of looking for other nodes to compile on was slowing it down. – Kendall Helmstetter Gelner Jan 06 '11 at 18:37
  • Disabling the network adapter sped things up for me. Then, after re-enabling the adapter, it stayed at a good speed. thanks Felz – Fidel Aug 18 '11 at 13:45
1

Quite often, problems like this can be fixed by going into your application directory and deleting the BUILD directory. X-Code automatically generates this directory upon compile anyway so you won't lose any data, it just cleans things up a little and MAY allow you to compile quicker in the future.

Source: Alan Cannistraro, Stanford University on one of his iPhone Developement Class Podcasts

Dan Hanly
  • 7,829
  • 13
  • 73
  • 134
1

Which hard disk is your project on? Could it be a slow drive and/or a full disk kind of issue? I presume its not a networked drive...

What does the Activity Monitor show - is the machine 100% busy CPU-wise or not?

Chris Kimpton
  • 5,546
  • 6
  • 45
  • 72
  • 1
    Very close answer (in retrospect). I discovered the hard way that it was a dead drive. It was having problems reading certain sectors and thus very very slowv. – John Smith Sep 26 '11 at 13:42
0

Try and update XCode? (do not read the following : answer needs 30 characters, so I fill my answer with this sentence)

moala
  • 5,094
  • 9
  • 45
  • 66