Xcode 7 slow and sluggish - xcode

Since upgrading to xcode 7 and greater, the performance of xcode is terrible. When I click on a class or scroll the code pane it sometimes takes up to 30 seconds before reacting and often I need to force quit xcode and restart.
I have turned off source control and I am not using swift.
I have a new macbook pro with 8gb memory and an SSD. my computer is fast and has no other performance issues.
-UPDATE-
I have cleared derived data and am not using any unusual plugins
Does anyone know what may be the problem? I imagine some build setting is causing this but im not sure which.

The issue is totally with xcode 7.
try to commit/save every time you make some changes, it will increase some performance

Related

Xcode freezes on "fetching app store configuration"

I have mac os mojave and xcode Version 10.1 (10B61). I try build unity3D game. I can successfully build it to iphone 5S device. But when I try submit up to App Store it is not working.
What exactly happens:
On step "fetching app store configuration" xcode freezes. In active monitor I see it as unresponsible application (or something like it). And XCode take almost all free RAM (4.5GB). After sometime (around 20 minutes) mac restart (I have problem with iMac, it restart when use too much RAM, I don't think it related to xcode)
Actually, if I wait long enough (more then 15 minutes) it is start working.
XCode require a lot of RAM + SWAP
Here's an answer for someone who stumbles upon this later, I just want to share what helped me. I also ran into the same problem while trying to distribute a Unity-built game with Xcode (also contains pods).
I work on a MacBook Air 2013 with only 4GB of RAM, so whenever I do anything with Xcode, I first close everything other than Xcode, Finder and Activity Monitor. As soon as I start whatever it is that usually freezes Xcode, I switch to Activity Monitor and track what's happening with the memory.
In the case of freezing while "Fetching App Store Configuration...", the problem appeared to be RAM, more precisely SWAP. I did not have enough memory available on my hard drive, which Xcode tried to use for SWAP and just... well, failed. So I cleaned up my hard drive and finally it went through very smoothly, but it occupied about 9GB of RAM at its peak (5.4GB in SWAP).
So just try to have enough memory available to feed the beast, observe what's happening in Activity Monitor and you should be good.

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.

How to disable indexing in Xcode 4?

Not a long time ago I updated Xcode to version 4. This new version spent a lot of time on indexing the project (it's quite large). That's why I would like to disable indexing. Searching through Xcode help and internet gave no results.
Open a terminal window and paste this command:
defaults write com.apple.dt.XCode IDEIndexDisable 1
You'll lose some features (autocomplete, jump to definition, some of the assistants won't work right). But you'll gain back ram and cpu.
For my project Xcode went from using 2 Gigs to a few hundred MB. (which I sorely needed to compile with ;))
Reducing the priority of the XCode process helps:
renice 10 -p PID
You can get the PID from the Activity Monitor or top/ps commands.
This problem has been noticed on this newsgroup:
The crux of it seems to be that XCode4 uses crazy amounts of ram during indexing - like, 5gb or so(!), and thus if you're on a machine with something like 12gb, there's no problem, but if you're on a laptop with only 2gb or so, you'll have some pretty severe paging going on.
I'm guessing apple's internal engineers were all rocking maxed-out mac pros or something.
I ran into either the same problem or something similar. My project includes heavily templated C++. Including those headers in the PCH file solved the problem for me.
My new retina Macbook pro running XCode 4 was extremely slow doing indexing (and everything else). My Mac mini at home was very fast working on the same project!? Turns out it was my anti-virus software - doing a scan of every file read or written on the MacBook. Turning that off sped everything up by a ton.
Slow indexing is not a given. And more memory isn't necessarily better.
I have a medium sized project for work ~ 500 source files. After deleting the derived data, it takes 18 minutes to finish reindexing this project. That's with no other apps open and not doing anything else with the computer. This is on a fairly recent Macbook Pro with 8G of memory and an i7. Horrible, right?
My home machine is a recent Mac Mini with 4G of memory and an i5. On that machine the exact same project takes 40 seconds to completely index.
I don't yet know what the difference is, but I'm working on it.
It's not possible to disable indexing in Xcode 4. Many of the IDE's features are built on top of the index it maintains.

Resources