Ayende @ Rahien

It's a girl

Profiling with dotTrace

I have a tiny feature and a bug fix that I want to implement before I am going to focus solely improving SvnBridge performance. This is a really quick analysis of a single scenario.

Start dotTrace and set the application to profile then start it. There are a lot of options, but the default was always good for me.

image

In the application, prepare it for the scenario that you are going to perform. (In SvnBridge's case, this means just setting up the server to talk to):

image

Perform some actions against the application:

image

When you are done, hit Get Snapshot:

image

Now, I tend to go to the hotspots and check what is costing me.

image

The first line, WaitMessage call is fine, this is the WinForms client that is not doing much at the moment.

The second I can't really figure out, it is starting a thread, but that doesn't take so long. I am pretty sure that this is a case of mis-measuring, or just me not understanding this, but never mind that.

The rest of the calls, which takes huge amount of time, are... remote calls. I guess I should stop talking to TFS :-)

Comments

Graham Nash
03/27/2008 07:02 PM by
Graham Nash

"The second I can't really figure out, it is starting a thread, but that doesn't take so long. I am pretty sure that this is a case of mis-measuring,"

Switching to thread time instead of wall time might make those timings more clear, as wall time counts time sleeping.

Jimmy Bogard
03/27/2008 07:11 PM by
Jimmy Bogard

Oh the chattiness of TFS...one place I worked at could only branch on weekends as it would take down the entire server for the other several hundred developers connecting to it. Lots of fun getting calls from Malaysia and Europe screaming "I can't access source control!!!"

asher
03/27/2008 09:22 PM by
asher

u should really give aqtime a run. much better than dotrace.

Adam V.
03/27/2008 11:05 PM by
Adam V.

@asher: [citation needed]

Tristian Barrett
03/28/2008 12:37 AM by
Tristian Barrett

I'm sure you already recognize this; but one thing I noticed while using dotTrace and lots of remote calls, is that while your code is slowed down by the profiler, service and db calls aren't. So it's hard to directly compare how much time a remote call takes compared to an internal one, since the internal one is being exaggerated. So your remote calls are probably taking even longer percentage wise than they would appear to be in the profiler.

Frans Bouma
03/28/2008 09:04 AM by
Frans Bouma

Does dottrace already support .net 3.5 ? The vs.net profiler in 2008 is starting to get on my nerves with its requirement of working with unsigned code...

Comments have been closed on this topic.