My C# Application causing high CPU. How to debug?
Posted on 2011-02-27
I have a C# application which I have made. It does 100+ different tasks and recently I made some changes in my code that has started to cause random high CPU usage.
Unfortunately I have lost track of the last set of changes I had made and trying to troubleshoot it by disabling 1 function at a time would be very time consuming.
My program also runs about 40 different threads so using the debugger to chase the code 1 step at a time isn't very helpful either.
I know my program doesn't generally use so much CPU. So I have some logic error somewhere but very hard to find!
Any tips on how I can troubleshoot this better? Pehaps theres a better way to make use of the debugger tool?