I have a project with about 1000 classes in it (no, there is no way to conveniently break this project into multiples). Just loading the project takes about 20 minutes as intellisense slowly chugs through all the classes, and eats almost 1gb of memory. Is there a way to turn off Intellisense for a single project, but keep it for all other projects in the solution?
+5
A:
What language is the project in? 1000 classes is quite a small project and should load in no more than 20 seconds. The problem is more likely to be caused by special files in the project that have compile time transforms run on them (eg. code generators). Do you have any code generators running as part of the build?
The problem could also be caused by:
- Poorly written Visual Studio add-ins. In particular I've seen source control providers cause this problem, but please also list the other add-ins you have installed.
- Loading the project directly from a network share, or having files in the project that are located on a network share.
- The development machine is old (slow processor as in single core P4 or earlier, low memory as in 1GB or less). If this is the case you should fix that first.
- The development machine has bloatware or failing components.
280Z28
2009-10-11 23:44:57
The solution is C#, all addins have been disabled, the solution is on the local drive, the machine is a quad core with 8gb. The other 90 projects in the solution load very quickly, but this particular one takes about 25 minutes.I'm curious what kinds of solutions you work with if you see 1000 classes in a project as "quite small". Are you saying you have projects that are 10,000+ classes?
Brad Irby
2009-10-12 18:50:46
BTW, this happens when loading the project into VS, not when building.
Brad Irby
2009-10-12 18:55:02
+3
A:
The problem is almost certainly not related to Intellisense. There are at least a few things you can try:
- Turn off any add-ins you may have installed, such as R# or CodeRush.
- With Visual Studio not running
- Delete the .suo file for your solution and project, if there is one.
- Delete both the
bin
andobj
folders.
After those steps, restart Visual Studio, open your project again and see if you get better performance.
Scott Dorman
2009-10-12 00:14:51
@Cyclone: The .suo file holds your local "settings", such as what files were open when Visual Studio closed, the startup project, etc. I'm not certain of why it is hidden, but most likely because it is a binary file, so there isn't much you can actually see in it and nothing you could edit. Easily 95% of the "wierd" or "strange" problems I've seen/heard/experienced in Visual Studio are related to the .suo file and deleting it solves the problem.
Scott Dorman
2009-10-12 00:25:59
I've tried deleting the SUO file, deleting the entire project and adding all classes back, clearing the whole solution and rebuilding all. Nothing is helping. I have uninstalled (not just turned off, but uninstalled) any addins. My suspicion is that it's TFS related, but i've tried opening with my VPN into the FTS Server connected, unconnected, and disassociated from source control. All to no avail.
Brad Irby
2009-10-12 18:53:34
BTW, CPU goes to 50% and VS stops responding for the entire 20 minutes. I also get the message saying that "vs is working on a background thread" which is a good indication that it's intellisense chugging through.
Brad Irby
2009-10-12 18:59:38