5

Updated to xcode4 days ago, xcode4 is really nicer to xcode3. But I met a memory issue when using xcode 4. The total active memory kept growing when the xcode4 war running, grew from 500m to 2.4G, the process memory is around 200m. It's strange~

After I closed xcode, the total active memory didn't go down soon, it was 2.4G for about 10 minutes.

Has anyone else met this issue too? Thanks for any info!

== Updates ==
Upgrade to XCode4.0.2, still has memory issue

sorin
  • 161,544
  • 178
  • 535
  • 806
Fourj
  • 1,817
  • 1
  • 18
  • 34

3 Answers3

2

I have the same problem. At times Xcode 4 starts to index your project (you can see "Indexing" message in the status bar at the top of window). During that it could use up to 2.8GB (!) of memory.

As soon as it happens I stop to use my laptop and start to make tea :) If the swap exceeds 500M I restart my computer. I have 4GB of memory installed in my macbook 5.2 and there is no way to increase it :(

I don't know exactly what that "indexing" actually means. I supposed that it is connected with Code Sense in some way. But when I tried to disable code completion (preferences -> text editing -> editing), it didn't help.

I hope Apple would fix it in the next release. If not, the only way is upgrade my computer. Or use Xcode 3.2.

y0prst
  • 611
  • 1
  • 6
  • 13
  • Thanks for info. I've upgraded to 4.0.1 but the problem hasn't been solved. Xcode still uses up to 3.2 GB of memory from time to time. Actually what was said is "Fixed a bug that prevented indexing of some projects". – y0prst Mar 29 '11 at 07:45
  • I am struggling with the same issue. I end up restarting my Mac several times a day to work around it, although I just observed my active memory usage seemed to fix itself after quitting Xcode and leaving the computer alone for ~10 minutes... – Nick Dowell Aug 10 '11 at 12:28
0

I'm having this same issue. Currently I'm using following workaround:

I have Activity Monitor opened on a second screen, and whenever Xcode reaches 1GB I restart it, and it works smoothly once again.

I know it's far from perfect workaround, and I'm looking forward for a better one.

I have Xcode 4.0.1 & OSX 10.6.7

BamboOS
  • 478
  • 5
  • 13
0

I found a solution!!!

I wanted to clean my /Library/Cache. Accidentally I deleted part of my /Library :-) so I decided to do a full system restore using OSX DVD and my current (20 minutes old) Time Machine backup. I did the restore and ... It fixed the problem!. Time Machine restore cleans all cache! (it should be enough if you only delete the content of /Library/Cache and {HomeDirectory}/Library/Cache). Good luck!

Community
  • 1
  • 1
BamboOS
  • 478
  • 5
  • 13