Very slow tab switching in Xcode 4.5 (Mountain Lion) - xcode

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.

It's a common issue and was fixed in XCode 4.5.1.
https://devforums.apple.com/thread/167765?tstart=0

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.

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.

Check that there is not heavy coding on ViewWillDisappear.
Also if you have NSURLConnection or any other having delegate methods should not get called while switching tabs.

Related

This installation of Xcode 4.3.2 requires Mac OS X 10.7 Lion

Recently i upgraded to mountain lion.I want to open my old projects in older version of xcode 4.3 and i don't want to use xcode 5 for some reason.
Is there any way to open xcode 4.3 only. I have installation file of xcode 4.3 if its needed to reinstall.
It gives alert "This installation of Xcode 4.3.2 requires Mac OS X 10.7 Lion."
I know how to run my projects in other versions with old simulators... but only need 4.3
Any Suggestions?
Ignore the snarky comments by people like matheszabi; there are good reasons to support the millions of units of older devices. Tip: If you are looking at picking up older devices, you'll want to target iOS 4.2.1 not 4.3, as every device supporting 4.3 can be upgraded to iOS 5. See Highest Version of iOS Supported.
Virtualizer
To answer your question, "Any suggestions?": Use a virtualizer like Parallels, Fusion, or VirtualBox to run Lion, Mountain Lion, or Mavericks in a virtual environment. This arrangement has many advantages, including resisting the pushing and shoving of Apple to constantly upgrade our OS, Xcode, and iOS targets.
Another advantage is a pristine working environment with its own clean Keychain, Desktop, and so forth having only items related to Xcode project(s). All my own personal stuff is kept to the real Mac. I think of the real Mac like I do my home, with personal property, while I think of the virtual Mac as my office space, my cubicle, having only work-related items.
The one thing you'll need is memory (RAM). If you want a 3 or 4 gig virtual Mac, you'll need about that much space unused on your Mac. By unused, I mean the green colored piece of pie in Activity Monitor.
My Experience
For my current project, I run Xcode 4.6.3 targeting iOS 5 & 6 in Parallels 8 (9 is now available) on a Mac mini (Late 2012) with 16 gigs of memory and i7 quad-core with 8 virtual cores driven by Mountain Lion 10.8.5 on the real Mac, while the virtual Mac has 4 gigs of memory and 2 cores. For the most part this works very well. A few bugs, but no show-stoppers.
The only bad bug is that copying text from the real Mac and pasting into the virtual Mac appends an extra mysterious invisible character that wreaks havoc, including preventing compiling of Objective-C code. I routinely do searches for that evil character, and try to make a habit of hitting Backspace after pasting text brought over from the real Mac.
Another bug: Horizontal scrolling by finger-swiping on my Apple Magic Mouse does not work in the virtual environment.
But Parallels 8 + Mountain Lion + Xcode 4.6.3 works well. You can plug in an iOS device for direct debugging via USB cable – Parallels asks whether you want the connected device to be seen by the real Mac or the virtual Mac.
I've also run earlier versions of Xcode 4 on Lion (besides Mountain Lion) in Parallels 8.
With this arrangement, I am free to consider upgrading my real Mac to Mavericks while keeping my Parallels 8 + Mountain Lion + Xcode 4.6.3 work environment intact. Though, I may need to shell out some money to upgrade my Parallels 8 to the new version 9. No such thing as a free lunch! (But this arrangement comes close)
Backups
Tell Time Machine to avoid backing up the 20-50 gig file that is your virtual Mac's hard disk. Instead, do an occasional backup of that large file. More often, make a backup of your import work files and Xcode project, copying off to Dropbox, Google Drive, or external hard drive or SD card. If that file that is your virtual Mac's hard disk ever gets corrupted, you may lose everything. So backup religiously – though I'm sure you do so anyways now. ;-)
Looks like Xcode 4.3 doesn't know about Mountain Lion, the fix would be downloading and installing Xcode 4.6.2 from developer center, which surely supports it.

xcode 5, Mountain Lion: Very slow performance

Installed Mountain Lion and Xcode5. Tried to open a project recently developed for iOS6. And now xcode is dramatically slow. Any ideas whats wrong with him now?
EDIT
It works fast with new projects I create. It slows down only when I open the old projects.
Ok. I found the problem. The screen attached.
When I switch 'Opens in' to Default 5, Xcode changes the UI Presentations to ugly iOS7 design and xcode suddenly starts work fast like in good old times. Switching back to 4.5 brings the very slow performance back. Thats it guys!
It reminds a problem I had with xcode 5 ( also mountain lion), the typing was very slow..
what help to fix this was removing all breakpoints ( I had nice and big list of breakpoints)
It seems to be keeping previous windows open too, so the more you switch between source files or XIB's, the more it will lag. I didn't check the memory use, but maybe it's running me out of RAM since I have a limited amount free with my Windows VM running. Quite annoying, but it works for me to close and reopen Xcode when this starts happening.

Xcode uses 16 gigs of RAM in 2 minutes

I'm working on a big project and I have some serious problems with Xcode RAM management. In the informative app I'm working on I have over 90 UIVIewControllers on my storyboard. Once I open my project and go to my storyboard file (just changing labels, zooming in and out etc') it takes less than 2 minutes for Xcode to go from 400MB usage to 8 gigs.
This will only happen while I'm using the storyboard.
This never happened to me in other apps I've managed so I believe it got something to do with the size of this app.
The above was on a new MacBook Pro. To test things out I tested it on a Mac Pro with 16 gigs of RAM. First run, same issue. 16 Gigs of ram is used after less than 2 minutes.
Things I've tried:
Deleting DerivedData (the issue is on 2 different machines so it can't be it but tried it anyway)
Deleting project.xcworkspace
Read about stoping indexing BUT without autocomplete and quick help I'll have nothing to compile anyway
I'm using Xcode 4.6.3
sounds like it is a problem with that version of Xcode. I am using 4.6.3, and have never experienced this, (although the apps I work on are never that big). You should definitely try Xcode 5, even if you cant submit to the appstore, at least you'll be able to work on your app. Then you MIGHT be able to open it in version 4.6.3, and submit it from there, not quite sure it will work, but its worth a shot. Make sure you keep a copy of what you have so far incase your Xcode 5 version wont work in 4.6.3, so you dont loose your work. hope this helps.

Xcode freezes at indexing, randomly, iPhone dev

My Xcode version is 4.6.2, which is the latest at this moment 2013.6.2, when I try to run a project(not a specified one) in simulator, it randomly freezes(stops) at indexing. I don't know if it's my macbook's problem because it's relatively a old one. My project is very light-weighted, just some demo. I'm a newbie. Normally, it works well, but sometimes it freezes at indexing, say 5% possibility.
And I cannot stop it even I clicked the "Stop" button at the right of "Run", and either if I close the simulator. I have to force the computer to shut down by keep pressing the power button. It brings damage to computer.
Anyone knows how to fix this? Or I have to get a newer one? Any help will be appreciated. THANKS.
Screenshot:
Xcode 4.6.2 in 1.4GHz, 2GB Ram
This is the main problem, the Xcode needs 2GB+ itself, and there are others applications and processes running in foreground and background.
I have 3GHz C2D, 4GB RAM, still at times it hangs at times :(
So, either you need to upgrade the hardware or degrade the Xcode version.
EDIT:
As you have Macbook air, you cant upgrade the RAM which is soldered to the motherboard.

XCode 3.2.6 hangs up

My Xcode 3.2.6 is hanging up constantly.
While I'm coding with no apparent reason it starts consuming more and more CPU, CPU temperature rises up to 80 celsius, the fan get exhausted and I'm forced to "force-quit" it and relaunch it to be able to continue working...
It start happening this week and nobody else on my project is having the same troubles.
My OS is Snow leopard 10.6.8
Any ideas on what could be happening?
I had the same exact issue with my Xcode 3.2.6 project... Would start out using one core and if I let it sit, would use all 8 cores of my i7 MBP. Very frustrating having to restart Xcode every 5 minutes.
My issue actually was resolved when I removed an iPhone from the Organizer that was running iOS 5.0.1. Xcode was trying to get information from the iPhone, and wasn't able to, since the iOS SDK requires Xcode 4.x
I also removed all the user settings from within the project's *.xcodeproj package as well; not sure if that had additional effect. removing those without removing the iPhone had no effect, though.
Have you tried doing a "clean" on the target? Have you tried checking your disk with Disk Utility?

Resources