为什么 Begin PreRenderComplete 和 End PreRenderComplete 事件之间有很大的差距?
我想知道是什么导致开始和结束 PreRendercomplete 事件之间出现这种差异,或者我如何找到瓶颈。
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
编辑
以下是有关生成的跟踪的更多详细信息
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
隐藏的代码:
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
我不确定如何跟踪预渲染完成事件上可能运行的内容。页面生命周期中此时是否有任何其他类型的控件或函数在运行?
更多信息
这种延迟的部分原因似乎与页面上的 ajax 控件有关。我不确定为什么它们会在加载时间上造成如此大的差距,但显然它们确实如此。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我必须扔掉经过验证的真实答案。简介简介简介。这应该为您提供查看进程锁定位置所需的所有信息。
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.
您可能有一个事件处理程序附加到需要很长时间的
PreRenderComplete
事件。我首先在您的代码中搜索对PreRenderComplete
的引用,然后从那里开始。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 toPreRenderComplete
and going from there.