views:

239

answers:

3

I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin Render and End Render is 1.4 seconds. From MSDN I see that

All ASP.NET Web server controls have a Render method that writes out the control's markup that is sent to the browser.

If I had the source code for all the controls on the page, I would just instrument them to trace out their render time. Unfortunately, this particular page has lots of controls, most of them third-party. Is there tool or technique to get better visibility into what is going on during the render? I would like to know if there is a particularly poorly performing control, or if there are simply too many controls on the page.

+1  A: 
<%@Page Trace="true" %>

See http://www.asp101.com/articles/robert/tracing/default.asp.

Mark Cidade
A: 

It may not help if the problem is inside one of your controls - as you expect - but if the page is poorly designed and that's causing render to be slow, YSlow should help clean that up.

Adam Tuttle
+1  A: 

Download ANTS PROFILER, this will give you a perfect overview of the lines causing the slowdown.

Also when it's about rendering make sure you don't use to much string concats (like string += "value") but use StringBuilders to improve performance.

Gabriël