obautista
obautista

Reputation: 3773

How to monitor or profile a slow .Net Web Application

Can anyone tell me how to go about determining the culprit on a slow running process. I have a page that queries an Active Directory and a SharePoint Server to get information. It makes several calls to each Server (retrieving customer information). I am wondering if there are any tools available to profile a web application looking for this type of information, slow running methods, etc.

Thanks for any tips given...

Upvotes: 0

Views: 474

Answers (4)

Oded
Oded

Reputation: 498972

Attach a profiler to the process.

There are several commercial ones - dotTrace, ANTS, memprofiler and others.

These will give you statistics regarding where time is spent, what functions were called most etc...

See this SO thread with recommendations.


Update:

This will supplant the information that trace="true" will give (as answered by @Bala) and give you more detail (for example, if you are calling both AD and SharePoint in PageLoad, you are no closer to an answer).

Upvotes: 2

ryber
ryber

Reputation: 4555

I recommend YourKit over some of the others. An I believe there is a free trial

http://www.yourkit.com/

Upvotes: 0

Bala R
Bala R

Reputation: 108947

Try setting Trace="true" for Page like this

 <%@ Page ... Trace="true" ... %>

and it will generate trace info at the bottom of the page like this

enter image description here

And here's an MSDN post related to that.

Upvotes: 3

Felice Pollano
Felice Pollano

Reputation: 33252

Without any tool, start by surrounding "interesting" methods calls with Stopwatch. Log the results somewhere ( I suppose you already have a log enabled ) and you probably will discover the performance pitfall. If this fails, follow the Oded reply ;)

Upvotes: 2

Related Questions