Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find slow/ineffecient method calls in dotnet

Tags:

.net

I'm faced with a big old stack of method calls in some legacy code, one or some of which is creating a bottleneck and really slowing things down. Is there any quick way I can get a report on which method calls are taking the time, short of running in debug, stepping through and seeing where the cursor pauses?

like image 793
Bob Tway Avatar asked Apr 20 '10 11:04

Bob Tway


2 Answers

Use a profiler. I personally use JetBrains dotTrace but that's mainly because I was given a free licence as an MVP. There are other tools available too, such as RedGate's ANTS. I haven't used the ANTS one myself.

There's a free profiler from Microsoft which targets .NET 2.0; I expect it would work with .NET 3.0 and 3.5 as well, but quite possibly not .NET 4 as that has a new CLR. My own experience with this is that it's somewhat limited, but can still be useful.

like image 139
Jon Skeet Avatar answered Nov 09 '22 23:11

Jon Skeet


Try Eqatec

like image 35
Joe Ratzer Avatar answered Nov 09 '22 22:11

Joe Ratzer