What's the upper limit on the number of projects within VS2005?
I had a friend whose team said:
"...most of them have 1GB of RAM and Pentium 4 3.0Ghz HT CPU’s. hey are all complaining about performance, especially with build times. Visual Studio is eating up most of the memory on their systems. Right now those with 1GB of RAM are generally running around 1.2GB of memory usage, so they are swapping like crazy and thus adding even more overhead. There are a couple systems with 2GB of RAM with Core Duo CPU’s. These systems are having the same issues where they are using 2.2GB of RAM, most of which is meaning eaten up by Visual Studio."
And I asked...
"Do they have too many projects in their solution?"
and he said...
"They said 50 projects and growing."
...and Scott Guthrie posted last week on optimizing build times in VS 2005.
"1.2GB RAM usage is pretty out there...50 large projects will strain a system depending on what they are doing. They should look hard at whether they really need all 50 in one solution. Multiple solutions (even with multiple instances of VS running) work great too."
Clarifying Update from ScottGu:
You should be able to load 50 projects in a single solution - my comment in the origional mail wasn't to imply that you can't. It was more than 1.2GB of RAM to-do so is larger than I would expect (unless each project is large and there are lots of cross project references).
Editoral: That makes me suspect Resharper as the issue in this case..
As an aside, they were also running Resharper at the same time, and it's currently unclear how much memory was being used by Resharper's on-the-fly analysis. I'll post if I learn more.
Nutshell: Try to break your projects up into reasonably sized subsystems that can build separately. Our SDK has about six solutions, each with about 10 projects.
If you're running VB and you're hitting the VB-specific problem with large projects, you can get a HotFix here.