Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Very slow tab switching in Xcode 4.5 (Mountain Lion)

I recently updated my MacBook Pro (2.3 GHz Intel Core i5) from Lion to Mountain Lion and simultaneously upgraded Xcode to the latest 4.5 version. I've experienced one very irritating problem. While programming I'm used to have a couple of tabs opened at a time. Ever since I updated, each time I switch tabs, Xcode freezes up for a bit (a couple of seconds). Does anyone have a suggestion to solve this problem?

I followed a tip on deleting project.xcworkspace to improve performance. Which seamed to help, but only for a short period of time.

like image 864
Anden87 Avatar asked Sep 27 '12 15:09

Anden87


3 Answers

It's a common issue and was fixed in XCode 4.5.1.

https://devforums.apple.com/thread/167765?tstart=0

like image 69
Nitzan Wilnai Avatar answered Nov 11 '22 17:11

Nitzan Wilnai


If you have multiple partitions (maybe a backup of Lion was kept) ensure that xcode really comes from the Mountain Lion partition.

The App Store App update for Xcode seems to take the first Xcode.app it finds and will apply any update to that version. In my case it updated the (inactive) Lion partition, even so I booted from the ML partition. xcode-select did not complain when I tried to change it to the ML version.

So I ended up doing the great housekeeping:

  • do a chmod 000 /Volume/<old Lion partition>/Applications/Xcode.app
  • installed a fresh copy on Xcode.app into /Applications
  • verify the destination of the dock icon (must point to the ML Xcode.app)

My Xcode is now fast as before and it remains fast. You can get the Xcode dmg and the command line tools from https://developer.apple.com/downloads/index.action. I don't think there is a difference in the binaries, but with the DMG I could see where I dropped the Xcode.app.

like image 2
Olaf Avatar answered Nov 11 '22 18:11

Olaf


I found your question before I discovered a partial solution.

As of today, I find XCode 4.6.1 GUI dog slow for my taste, specially considering that I run on a one year old mac, SSD, compile to a 2GB RAM disk and still have 6GB RAM left. Even Eclipse runs lightning fast compared to XCode

4.5.1 did improve something, but after a long time using XCode I do not have any hope for some of its problems being solved ever.

That being said, I have noticed that "Live issues", the main tool bar and all the panels slow down tab switching to same degree. The biggest offender so far are the navigator panels.

Once I got used to a minimalistic Xcode window, layout some specific task tabs, keep a separate window for xibs and learned the shortcuts to enable/disable the panels, I no longer suffer so much with XCode responsiveness, but there is still some lag that can be clearly felt.

like image 1
SystematicFrank Avatar answered Nov 11 '22 17:11

SystematicFrank