I am currently developing a game with Xcode 4.1.1 (MBP recent, 8Gb mem). The project accounts for approximately 200K lines of objective-C, 2500 resources.
At times, Xcode comes to a screeching stall. I find i need to nuke it and restart. However, upon restart, Xcode bolts just about every byte of of free or inactive memory on my computer, and may eventually not start at all. In those circumstances, I see either mds or finder running furiously on multiple cores, and have to nuke them to even be able to nuke Xcode. After a few false starts, Xcode finally completes its startup (often parked around 3Gb).
Now, here is the kicker: if I quit and restart (multiple times), it will eventually settle around 250 Mb of memory, and be workable again ... until the next screeching stall.
Any ideas?