0

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...

obautista
  • 3,517
  • 13
  • 48
  • 83

4 Answers4

3

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.

Bala R
  • 107,317
  • 23
  • 199
  • 210
2

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 ;)

Felice Pollano
  • 32,832
  • 9
  • 75
  • 115
2

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).

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
0

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

http://www.yourkit.com/

ryber
  • 4,537
  • 2
  • 26
  • 50