views:

143

answers:

2

I'd like to know what can cause this kind of disparity between the begin and end PreRendercomplete events or how I migh go about locating the bottleneck.

aspx.page   End PreRender   0.193179639923915   0.001543
aspx.page   Begin PreRenderComplete 0.193206263076064   0.000027
aspx.page   End PreRenderComplete   1.96926008935549    1.776054
aspx.page   Begin SaveState 2.13108461902679    0.161825

EDIT

Here is some more detail about the trace that was generated

aspx.page   Begin PreRenderComplete 0.200593573416824   0.000028
PR-S                                0.200606270612464   0.000013
PR-complete                         0.200622654090709   0.000016
PR-E                                1.97799207367323    1.777369
aspx.page   End PreRenderComplete   1.97805105419491    0.000059
aspx.page   Begin SaveState         2.11171607104531    0.133665

The code behind:

Private Sub _Default6_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRenderComplete
    Trace.Write("PR-complete")
End Sub
Protected Overrides Sub OnPreRenderComplete(ByVal e As System.EventArgs)
    Trace.Write("PR-S")
    MyBase.OnPreRenderComplete(e)
    Trace.Write("PR-E")
End Sub

I'm not sure how else to trace what might be running on the pre-render complete event. are there any other type of controls or functs that run at this point in the page lifecycle?

More Info

Part of this delay appears to be related to having ajax controls on the page. I'm unsure why they are causing such a large gap in the load time but clearly they are.

A: 

You probably have an event handler attached to a PreRenderComplete event that's taking a long time. I would start by searching your code for references to PreRenderComplete and going from there.

Dean Harding
I'm not able to bind to the prerendercomplete event as far as I can tell so that's not causing the issue.
Middletone
The `PreRenderComplete` event is available on the Page itself: user controls and the like cannot bind to it, but you can bind to it in the page itself.
Dean Harding
A: 

I have to throw out the tried and true answer. Profile profile profile. That should give you all the information you need to see where the process is locked on.

Chris Marisic