Wednesday, October 31, 2012

What does Visual Studio do to consume so much CPU?

I have noticed recently that Visual Studio is a CPU hog and sometimes it gets itself into a mode that literally eats CPU cycles like they're going out of style. I have been working on a game today and I could hear the hard-disks rattling in the PC and I looked at the CPU monitor and it was pegged at 78% while the machine was sat idle. That's 78% of a FOUR PROCESSOR 2.3 gigs per proc machine!
Looking at Task Manager I found that an instance of Visual Studio was consuming nearly all of three processors and much of a fourth and that the swap-file was getting thrashed. Closing down Visual Studio again takes the CPU consumption down to 4%. Restarting VS again does not produce the same bad behaviour until some magic trigger trips it up again.
While I realise that Visual Studio does a lot of stuff, it seems to me that it gets a bee in it's bonnet about something and goes off into the realms of outer space with no real rhyme or reason.

No comments: