4

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?

1
  • 1
    Thanks for the suggestions, but they still don't answer my question. Is there any way of turning off Intellisense for a single project only? I know there is an attribute that lets me hide a method from intellisense - can I hide an entire project?
    – Brad Irby
    Oct 12, 2009 at 19:02

3 Answers 3

5

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.
2
  • 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
    Oct 12, 2009 at 18:50
  • BTW, this happens when loading the project into VS, not when building.
    – Brad Irby
    Oct 12, 2009 at 18:55
4

The problem is almost certainly not related to Intellisense. There are at least a few things you can try:

  1. Turn off any add-ins you may have installed, such as R# or CodeRush.
  2. With Visual Studio not running
    1. Delete the .suo file for your solution and project, if there is one.
    2. Delete both the bin and obj folders.

After those steps, restart Visual Studio, open your project again and see if you get better performance.

5
  • What does the .suo file do, and why is it hidden?
    – Cyclone
    Oct 12, 2009 at 0:19
  • @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. Oct 12, 2009 at 0:25
  • 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
    Oct 12, 2009 at 18:53
  • 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
    Oct 12, 2009 at 18:59
  • @ScottDorman: Oh my goodness, THANK YOU!!! I tried deleting .suo, "devenv /ResetSettings," disconnecting from source control and settings all files to read/write, and everything else I could think of. Finally I deleted the "bin" folder and that worked. Finally, after losing hours of productivity. Thank you so much. :)
    – Chiramisu
    May 21, 2012 at 17:45
0

Discussion continues on this thread

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.