I have an issue with Xcode 4 really responding very slowly to user interactions, e.g. editing code, scrolling areas etc. This particularly happens with larger scale projects with many controllers/view files etc.
I completely wiped the hard disk and re-installed Snow Leopard and Xcode the other week but steadily it ground to a frustrating response time again (over a number of days) disrupting workflow considerably.
I have also on occasion removed the project's "derived data" via the Organiser -> Projects and this has had little effect.
I'm wondering if there is anything I can do to improve performance other than get a higher specced machine in the first instance.
FYI I'm running MacBook with Intel Core 2 Duo processors at 2GHz and 4GB of RAM.
In case we need to upgrade I'd also like to know if people are experiencing this poor performance from Xcode 4 on well specced machines (which would make our hardware upgrade rather pointless as it's only Xcode that has any performance issue on the MacBook).
If anybody has any suggestions or recommendations or could even let us know how improved hardware effects Xcode's performance on larger project trees then that would be extremely helpful and also a valuable resource for other devs in a similar position.
I've found a trick to accelerate the compiling performance of XCode 4: When you run or compile or do any other processing in Xcode and it stalls open active monitor, select the Xcode process then click on the sample process. It will make the process unstuck and run again as normal which allow to build app in a reasonable time.
I finally got my Xcode to work normally by turning off the git feature.
None of these responses really improved performance in my case (over time Xcode 4.1 became hardly usable, only quitting it now and then helped).
However, I just found out that if I keep closing all my documents (control-command-W) it seems to stay fast. Xcode automatically keeps all the documents that you click on in memory somehow, and you can navigate between them with control-command left/right arrow. If you accidentally open too many (especially IB windows), it crawls to a halt. Just closing all open docs now and then seems to alleviate this without the need to do a full restart.
I'm facing the same issues. They were partly fixed since the beta builds are still persistent. It seems that Xcode internally got one or more leaks which are floating your memory. You can watch this nifty "feature" very well when using the integrated Interface-Builder. Two possible solutions beneath praying and filling bug-reports to apple:
I resolved my issue by disabling snapshots as described here:
Editing storyboard in Xcode 5 is very slow
Everybody experiencing these issues should try Xcode 4.1 on Mac OS X Lion. I am surprised how much faster and responsive it is on the same hardware (Macbook Pro 2.66 GHz Core 2 Duo with 4GB of RAM here).
I suppose they fixed tons of performance bugs with this release.