Visual C# Developer Center > Visual C# Forums > Visual C# IDE > Visual Studio IDE is unusable for the first 5-10 minutes after loading a project
Ask a questionAsk a question
 

AnswerVisual Studio IDE is unusable for the first 5-10 minutes after loading a project

  • Monday, November 02, 2009 8:42 PMmegabitee Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Aparently it is updating the list of unit tests.  I tried EnableCMI=0 (http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/3e9cb0e1-3140-4854-99d3-904f4974a52d/) but that seems to have made it worse - now it goes into 50% CPU mode every time I make an editting change.

    I really do not care that the unit test list is up to date all the time.  I would be glad to wait for the update before running a suite of tests.  Updating the test list every time I load a solution simply makes the GUI unusable for 5-10 minutes.  Since VS2008 crashes on a regular basis this can be quite time consuming.  And now that it seems to be updating the test list aftger every text edit it has become completely disruptive.
    (and how do you stop typing in italics???)
    (and how do you remove the (unnecessary) hint that is covering up where I am typing???)

Answers

  • Tuesday, November 03, 2009 2:37 PMTaylorMichaelLMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Try the setting Tools\Options -> Testing Tools\Test Project -> Disable background discovery of test methods. 

    You might also consider loading up VS2010 Beta 2 to see if the problem exists in there as well.  If so you need to submit a Connect issue to MS to get the problem resolved before final release.

    Michael Taylor - 11/3/09
    http://p3net.mvps.org
    • Marked As Answer bymegabitee Tuesday, November 03, 2009 4:04 PM
    •  

All Replies

  • Monday, November 02, 2009 9:33 PMTaylorMichaelLMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The link you submitted indicated several possible solutions.  Did you try all of them and none of them worked?  How many tests are we talking about here?  Does this occur if you create a brand new test project? Do you have any addins installed?  Have you tried resetting your user data?  Are you running SP1 of VS?  What OS are you running?

    Michael Taylor - 11/2/09
    http://p3net.mvps.org
  • Monday, November 02, 2009 9:49 PMmegabitee Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes, I tried the various solutions in the link before posting here.

    We currently have about 1800 unit tests.

    Note sure what you mean by "create a new test project".

    No addins installed.

    Reset user data?  Is this different from deleting .ncb & .suo?

    Yes, SP1 of VS2008

    XP SP3
  • Tuesday, November 03, 2009 2:07 AMTaylorMichaelLMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    1800 is a lot but not enough to cause a slow down. 

    "Create a new test project" -> Create a new test project in a new test solution and then copy your existing unit tests to the new project.  Close and reopen VS to see if it stalls.  Then try copying the vsmdi(?) file containing the test lists and configuration.

    No the NCB and SUO are per-project settings.  The user data can be reset via the Import and Export Settings menu.  You might consider starting VS in safe mode (http://msdn.microsoft.com/en-us/library/xee0c8y7(VS.80).aspx) to see if that resolves anything as well.

    When VS stalls is it eating up the CPU or is it idle?  Is any other processing eating up the CPU?  Are you connected to a network CM tool like PerForce, CVS or TFS?  If so if you temporarily disable CM integration does the problem go away? 

    Does anyone else have the same problem as you with the same solution?

    Michael Taylor - 11/2/09
    http://p3net.mvps.org

  • Tuesday, November 03, 2009 2:27 PMmegabitee Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    The unit tests are scattered among almost 30 projects.  I don't know if I want to recreate all of these test projects.

    Reset User Data had no apparent effect.

    When VS stalls it uses up one of my two processors.  The IDE is alive but the response is up to 10 seconds and many times ignored.  Most GUI operations are impossible to perform because of the extreme delay.

    VS is obivously updating the test list.  I can watch the progress in the Test List Editor.  There is an initial period when the IDE is completely unresponsive - this is indicated by a single green bar in the Test List Editor progress bar.  As soon as the next bar appears the IDE is responsive but slow.  When the list is complete the processor % drops and the IDE starts working again.

    I disconnected from TFS.  The period at the beginning, when the IDE is completely unresponsive, appears to be much longer.  And now I see that it put all of my tests into the "Results Not in a List" list.  So, there appears to be a dependency on TFS and the network.  Perhaps the communication is slowing the update.  This seems to again suggest we need some way to simply disable updating the test lists.

    There is no other process using more than a few % CPU.

    If there was some way to disable updating the test list then my problem would be solved.  I would be glad to wait once at a later time.  I typically run all of the tests before checking in various changes.  Plus we build the solution and run all of the unit tests every night.

    We have 6 programmers who each experience this same problem in the same way.  We figured it was a common VS fault.  We just put up with it.  Yesterday I finally got tired of the constant delays which led to this post.

    This morning:  I loaded the solution, it rebuilt the test list. I cleaned the solution, it rebuilt the test list.  I built the solution, it rebuilt the test list.  Every time I rebuild the solution it rebuilds the test list.

  • Tuesday, November 03, 2009 2:37 PMTaylorMichaelLMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Try the setting Tools\Options -> Testing Tools\Test Project -> Disable background discovery of test methods. 

    You might also consider loading up VS2010 Beta 2 to see if the problem exists in there as well.  If so you need to submit a Connect issue to MS to get the problem resolved before final release.

    Michael Taylor - 11/3/09
    http://p3net.mvps.org
    • Marked As Answer bymegabitee Tuesday, November 03, 2009 4:04 PM
    •  
  • Tuesday, November 03, 2009 4:04 PMmegabitee Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    "...its just this little chromium switch here..."

    It still runs when I load a solution, then puts all the tests in "Tests Not in a List" which is annoying,  but it stopped updating after cleaning or building. 
    Muchas gracias!!!

    Also, if I then click Refresh on the Test List Editor it still puts all the test in "Tests Not in a List".  It checked out and changed the .vsmdi.  In order to get the tests back in their proper lists, I had to restore "Disable background discovery of test methods", close the solution, undo the .vsmdi, then reload the solution.  phew!

    Apparently the switch affects more than just background discovery.  Or maybe there is a subtlety here that I don't quite get.  At least we know how to maneuver around the funky parts now.

    I do not know when we are moving to VS2010.  I will try to test this when we do.
  • Tuesday, November 03, 2009 4:24 PMmegabitee Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    So I go waltzing into a coworkers office, "You're gonna owe me for this one...", proceed to explain the problem and the solution.  He says, "I don't ever see the test list update until I bring up the window.".  Acch!

    Turns out he has the Test List Editor window docked and collapsed on the left side of the VS IDE.  I tried it, it works.  With "Disable background discovery of test methods" unchecked, I docked and collapsed the Test List Editor, then cleaned and rebuilt.  The test list does not update even when I hover/click to open the Test list Editor window.  

    Originally I had the test List Editor as one of the tabs on top.  The test list would update as described above whether the window was visible or not.  This is a much better solution.  Go figure.

    Thanks for your help!