October 17, 2009

Code Profiler for .NET

I've always been interested in profiling my C# code. Years ago with .NET 1.1 I used the DevPartner Profiler Community Edition, which is no longer available. Ever since then I have been unable to find a good free or open source solution for profiling .NET code. I know that there are some decent commercial products out there, but I'm cheap and I don't the tools often enough to merit purchasing them.

Is code profiling just not in demand? It seems like if enough people were interested in the value of profiling, then there would be at least one decent open source solution. For me it has been fun on occasion to really dig deep into an algorithm that I'm working on. Trying to eek just a little more performance out of it. I've found that disassembling the code also helps to see what is actually happening behind the scenes. One of the nice things about profiling .NET code is that you don't need to instrument the code manually. When I used the DevPartner ProfilerProfiler I just picked the options I wanted and clicked go. After running the application I could delve into the details of which functions were being hit the most, and even which lines of code were consuming the most time. It can be a challenge to tune the performance of an algorithm or an application, but it can be rewarding to the code double in speed, or even more.

Hopefully I'll be able to find a good open source code profiler to "get my fix" on performance tuning my code.


blog said...

I think the big element is that it's a non-trivial problem that is solved through commercial products that are not unreasonably expensive.

I've evaluated both JetBrain's dotTrace and Red Gate's ANTS Profiler and they both were excellent tools for less than $500 each which, if you think about it, is a drop in the bucket, especially if you save hours from using the tool.

Richard Flamsholt said...

EQATEC Profiler is not open-source, but it has a good reputation and is completely free for non-commercial use.