Minimum spec for Xcode 4? - xcode

So after deciding to install Xcode 4 on my '09 mac mini because of how useful its instruments feature is (opengl stuff), it turns out that my mac mini only barely manages to run it.
In other words, it's crippled. I'm still here waiting for my program to run on the iPhone, and it's stuck with some "NSAutoreleaseNoPool" message.
The thing is, normally I would ask on how to fix that message, but currently XCode itself is frozen and not responding to anything.
Will upgrading from this old mac mini (it only has 1GB ram) alleviate this issue? Would the new mac mini with a 4GB ram upgrade suffice? IIRC it's core 2 duo 2.25ghz as opposed to my current 1.83ghz, would that make enough difference?
edit: not to mention, indexing cripples the performance to an extreme level

Especially when dealing with running VMs (i.e. an iPhone/iOS emulator), RAM is usually the choke point in my past experience.
I would think 4 Gigs of RAM should do it just fine. My Mac Book Pro has 4 Gigs of RAM and runs android emulators all the time and I'm still able to multitask.
Go into an Apple store and tell the guy you wanna demo the latest gen Mac Mini running XCode and its emulators and see if the performance if worth the investment. Its all Apple hardware/software so I don't see why they can't help you out.

8GB Ram
Since you can get already even 16GB Ram in Mac Mini (at least the newest), I cannot see why not take it? More here. Related threads mention very painful experiences with 1/2/4Gt particularly with Xcode 4. As far as I see it, 8Gt is becoming really a must-have, particularly when Xcode turns to 5.
Xcode 4 experiences
Minimum spec for Xcode 4?
http://www.cocoabuilder.com/archive/xcode/303406-xcode-4-system-requirement.html
https://apple.stackexchange.com/questions/14923/what-is-the-minimum-hardware-needed-to-run-xcode-4
Similar gettings slow threads
Xcode 4 configure to use less RAM?
Xcode suddenly very slow

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.

Mac OS X Lion 10.7.2 Xcode 4.2 memory issues

I've got MacBook Pro 2011, 15" i7 2GHz 8GB Ram 1333 MHz OS X Lion 10.7.2 all updates installed released to this date.
I have done everything what I can to minimize RAM consumpsion and the only problem I've got at this point is when I run Xcode. I had 4gigs of RAM, than bought 8 gigs and always 've got 10-30 MB of free memory after 3-5 minutes of Xcode running and PAGE INS are 300MB - 700MB. I tried to switch to 32-bit running mode but no change. Can anybody help me please?
Yes. One way is to disable indexing, another is to reduce the number of build processes. These are hidden preferences in Xcode 4 which I have detailed here:
Hidden Features of Xcode 4
I've also made a pretty extensive write up for improving and working with Xcode's resource issues:
Why are xcodebuild and Xcode 4.2 so slow?

iPhone OS: EXC_BAD_ACCESS and xcode freezing while debugging on device?

So usually when EXC_BAD_ACCESS happens when I'm debugging my (largely c++ based) iphone app, I can go over to the GDB window and it'll show me the current stack.
However, for some reason, lately XCode freezes. This happened on both xcode 4 and xcode 3.
By freezing, I mean the wheel of death just spins non-stop, and after a while, the whole OS becomes unresponsive. On many occassions, I had to turn off the mac manually.
Could this be a case of trashing? I'm compiling a 300 files, 150k sloc project on an old 2009 mac mini with only 1GB memory. Could this be the reason? I'm pretty close to just buying a new mac mini with 8GB memory, but it seems a bit unlikely that a 2 year old computer can't handle simple compilation.
Considering I use 2GB of RAM without even loading Xcode, your 1GB could well be a problem.
It also could be a recursive bug that causes the debugger a hell of a lot of work by having an enormous stack trace.
It might be an problem in some infinite while/for loop. Try to set break-point in all such kind of piece of code where while/for loop are used.

Terribly slow compiles using Xcode 3.2.5 and 3.2.6

OS X 10.6.7, Xcode 3.2.6 (although 3.2.5 shows the same behavior), Mac Pro - 2 2.4 GHz Quad w/ 8GB of RAM.
We have several of these machines, all but one are running great. A normal clean/build takes about 5-7 minutes. On the "naughty" machine it takes about 30 minutes.
Before starting the build the machine has over 5 GB of RAM free, CPU utilization usage is practically zero. We can't see anything that would be eating up resources.
This is just a pretty simple iOS project (using gcc 4.2) - nothing out of the ordinary. Once we kick off the build the XIBs are compiled quickly. It isn't until we get into the 15th-16th implementation file (.m) that the build process slows to a crawl. At that point we still have tons of RAM available and there is very little CPU usage.
Any recommendations as to how we might track down the issue with this machine?
Thanks!
Are you building with the release or the debug configuration? Stripping binaries (release configuration) can be pretty time consuming during build times.

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