Lani78

Hello,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sometimes Visual Studio 2005 starts to consume 100% of my CPU. I've tried see if it is when I'm doing something specific, but I cannot put my finger on what it is that might trigger it. It is my first solution in VS 2005, so I have no clue if it's specific to this C# solution. I have a Windows Forms project and a Webservice project in my solution, all connected to a SourceSafe 6 database. This far I've always been editing the Windows Forms project when the CPU consumption has kicked in. I don't even have to build or run the solution for this to happen.

If I close VS 2005 and open it again everything will be normal, sometimes only for 5 min, while other times it may well pass an hour without it happening.

I noticed a particular thing when I was writing this, if I open any menu item, such as the File menu VS stops consuming all of my CPU, but as soon as I close the menu item it starts to consume everything again. It doesn't matter how I open the menu (keyboard or mouse).

I'm using:

  • Visual Studio 2005 Team Edition for Software Developers v8.0.50727.42
  • .NET Framework 2.0.50727
  • Enterprise Library 2 November CTP.
  • ComponentOne FlexGrid for .NET 2.0
  • Windows XP SP2 Swedish with all updates applied.
  • IBM ThinkPad T41 with 1 GB of memory.

I don't know what else that might be of relevance.

I searched the forums but could not find any thread with the exact same problem and that were using the final release of VS 2005.

Regards,

Lani

 



Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

TaylorMichaelL

While VS is running it is continually updating Intellisense which can eat up CPU quite a bit.  If your solution is connected to VSS then it'll also periodically hit the server to check the status of the items.  You can control this in your options.  Try chaning the refresh interval and see if the problem goes away.  Also note that bringing up the toolbox, using Server Explorer and a variety of other things can really drain the CPU.  The toolbox is normally OK after you open it the first time.  Server Explorer will continually update so it can be a drain as well.  Finally, VS is keeping an eye on the file system for changes in any open files (an option as well) so you can look into that area.

Michael Taylor - 12/15/05





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

Hi Michael,

Thank you for your suggestions, I will look into the VSS feature, maybe try to disconnect the solution. And maybe it is as you say, the intellisens feature, as I've been able to work several hours yesterday and an hour today without any extreme CPU consumption.

I know that it isn't the Server Explorer or the Toolbox, as they haven't been open when this has happened.

Regards,
Lani





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

I'm sorry, I see now that I posted this in the wrong forum, it was ment to be in the Visual C# IDE forum, perhaps a moderator could move it. Thank you.



Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Karen Liu MSFT

Lani -

You mentioned that you're always editing the Windows Form.  Are you working with the designer or the code behind when you start seeing this happen

If it is the code behind, can you try going to Tools | Options | Text Editor | C# | General and disabling the "navigation bar"   Does this help at all

Thanks,

Karen






Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

Hi Karen

I'm sorry if I wasn't clear, what I meant was that I always edited the Windows Form project when this has happened, and I've always been in the code view when this has happened, but not always in the code for the form. Yesterday and the day before yesterday I could barley work with VS 2005, but today I haven't had any problems this far.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Regards,

Lani





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Karen Liu MSFT

Lani -

Have you tried disabling the navigation bar   Did that help

Thanks,
Karen






Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Karen Liu MSFT

Lani -

We've also been following-up internally regarding a similar problem when saving (looks like it only happens on WinForms projects) as well.  You can track responses here:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=173463&SiteID=1

Is there a point where this memory consumption occurs   On save   Switching windows   Debugging

Thanks!

Karen






Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

Hi Karen,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I did as you instructed and disabled the navigation bar and I have not had any problems since then, but I am still not sure that the problem is related to the navigation bar. I will turn the navigation bar back on and see if the problem reoccurs.

I have not noticed any problems when saving my projects.

Thank you for your continued input.

Regards,
Lani

 





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

Hi Karen,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The problem came back after a while when I had enabled the navigation bar again, I then went into the options and disabled it, but VS were still consuming 100% of my CPU, until I restarted it.

I will now run with the navigation bar disabled for a while, to make sure that the problem does not arise with it disabled, but it certainly looks like this could be it. I will try to remember to report back here on Friday, before I go on vacation.

Regards,
Lani

 





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

Hi,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Unfortunately I have to inform that the problem persists, although the navigation bar is disabled.

Regards,
Lani





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

TaylorMichaelL

Perhaps it would be useful if you looked at the threads within VS that are eating up the CPU.  You can use Process Explorer (www.sysinternals.com) to look at this information among other tools.  This will give MS an idea, hopefully, of which thread and which functions within the thread are causing the problem.

Using PE you would do the following:

1. When the CPU goes up for any discernable amount of time open PE (I recommend already having it open in the background).

2. Double-click devenv.exe from the process list to invoke the properties dialog.

3. Go to the Threads tab and sort by CPU usage.

4. Find the thread with the highest CPU usage (or select each thread and look at the CPU usage in the static information area).

5. Click on the Stack button to get a view of the stack.

This will only work if the CPU usage stays up for an extended period of time and will also only work if the problem is actually with VS and not something else.  When you bring up PE you'll immediately know if it is VS or not.

Michael Taylor - 12/22/05





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Lani78

Hi Taylor,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you very much for your suggestion, I will do exactly as you suggest.

I just noticed another thing, I was thinking of what you said regarding VSS, so when VS 2005 now had been taking all CPU for about 15 minutes I checked in all pending checkins, and you guessed it, CPU use went back to normal as soon as all items had been checked in!

Regards,
Lani

 





Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Turbo_Tail

What on heavens earth does Visual Studio 2005 do with 100% CPU time !

Good this is so extremely annoying, I caní»t even work when VS stops responding for half a minute all the time.

I have a solution consisting of ~15 projects and it happens for example when I switch from a source file in one project to a source file(WinForm) in another project. Every_single_time!

You guys own me at least an hour only today! Give me my hours back!

Waiting for respond...




Re: Visual C# IDE Why does Visual Studio 2005 starts to consume 100% of my CPU?

Karen Liu MSFT

Turbo_Tail -

I'm sorry to hear that you're having such a painful time with VS! Can you send me an email with some more details regarding your project and we'll try to track this issue down

Are all 15 projects in C# (or some VB, C++, web projects) Many custom controls What your project is trying to do

If it's possible to send the solution, that would be extremely helpful in trying to find a repro for this problem. My email is karenliu@microsoft.com.

Thanks,

Karen