I was beginning to think the performance issues were limited to my 4 GB RAM/2GHz Dual Core/Vista/Gateway laptop, but after moving to a different machine
running Windows 7 with 6 cores and 8GB of RAM, it seems the problem is identical.
If I run StyleCop from the context menu (right clicking) inside the body of a C# file... after clicking on any of the "warnings" in the error window to go to the line of the "violation", performance begins to degrade. The CPU usage on
the devenv.exe process goes above 50% on my dual core, and has a similar effect on the Windows 7/6 core machine.
Closing the output and error windows in VS 2010 seemed to have a small positive effect afterward, but very quickly, on both machines, it becomes impossible to work at all.
If I restart VS2010 on the Windows 7 machine, I can get performance back (I can edit all files needing style cop fixes before running style cop, and can work fully productively. Shutting down and restarting VS2010 on Vista doesn't seem to have as positive
an effect on performance.
The key seems to be running stylecop from the right click menu inside a C# file in the text editor, and then double clicking on any of the violations in the error window (at the bottom of VS2010).
I did about 10 different virus scans and rootkit scans on my laptop to make sure it wasn't a virus affecting performance. After confirming through those routes that my computer is "virus free," I'm glad I don't have to re-install Vista on my laptop.
But as the shop I'm working at requires StyleCop rules for all new code, and has it run in a hook for Subversion, we can't check in code unless it's StyleCop compliant.
We have hundreds of files that weren't developed with StyleCop, and making a small change to any of them can cause the entire file to be style copped... often there are hundreds of violations to fix in a single C# file.
If this is a known issue, please point me to any work arounds as it is severely affecting performance.
Basically Awesome Design LLC