Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 5 - out of control CPU and memory usage

Tags:

xcode

ios

I've been having issues lately with the latest version of Xcode 5. About a minute or so after launching CPU usage and Real Memory usage skyrocket. I've seen CPU usage as high as 400% and RAM usage as high as 13GB.

I'm on an i5 iMac with 16GB of RAM.

I've tried uninstalling Xcode and reinstalling, running all Mountain Lion upgrades, fixing recurring header loops, launching Xcode without indexing and a few other issues all to no avail. I'm now at a loss as to what I can do.

Activity Monitor after running Xcode for a few minutes. No compiles or anything

I would love suggestions of things to try. I've tried running my project on other i5 iMacs and I don't have this issue.

Thanks everyone.

like image 266
Andrew Kozlik Avatar asked Sep 25 '13 20:09

Andrew Kozlik


2 Answers

I had this exact problem over the weekend with my Macbook Air and Xcode5. I tired resetting Xcode back to default, deleting the iOS simulator files, etc.

I've isolated it to it being the Source Control functionality in XCode. The high CPU usage doesn't seem to happen when the affected Project is not open, (Close everything and start a new Xcode project). I've disabled Source Control within XCode and and started using GitX instead, and CPU levels for XCode has dropped back to normal levels (5 - 15%).

I haven't dug deeper into XCode to see what could have triggered it.

like image 143
tonytastic Avatar answered Oct 22 '22 21:10

tonytastic


I was running at 120% - beachball almost constantly - while idle.

What dropped me down to 1.3% was unchecking "Refresh local status automatically" in the "Source Control" tab in Xcode Preferences.

You can still have "Enable Source Control" and "Refresh Server Status Automatically" and "Add and remove files automatically"

like image 30
Roy Lovejoy Avatar answered Oct 22 '22 21:10

Roy Lovejoy