PreRenderComplete 和 SaveState 之间的时间滞后
我们正在跟踪 ASP.NET 应用程序,发现对于其中一个页面,从 PreRenderComplete 结束到 SaveState 开始有大约 2.5 秒的时间滞后。下面是日志的一部分
aspx.page End PreRender 9.123185387 0.184541
aspx.page Begin PreRenderComplete 9.123277718 0.000092
aspx.page End PreRenderComplete 9.123666575 0.000389
aspx.page Begin SaveState 11.7744191 6 2.650753
aspx。 page End SaveState 11.77457158 0.000152
aspx.page 开始 SaveStateComplete 11.77459695 0.000025
aspx.page End SaveStateComplete 11.77461284 0.000016
aspx.page 开始渲染 11.77462541 0.000013
aspx.page 结束渲染15.10157813 3.326953
我们试图了解这背后是否有任何理由。请帮助我理解这一点。
提前致谢
We are tracing our ASP.NET application and find that for one of our pages we see that there is a time lag of around 2.5 secs from the time PreRenderComplete Ends to SaveState Begins. Below is a part of log
aspx.page End PreRender 9.123185387 0.184541
aspx.page Begin PreRenderComplete 9.123277718 0.000092
aspx.page End PreRenderComplete 9.123666575 0.000389
aspx.page Begin SaveState 11.77441916 2.650753
aspx.page End SaveState 11.77457158 0.000152
aspx.page Begin SaveStateComplete 11.77459695 0.000025
aspx.page End SaveStateComplete 11.77461284 0.000016
aspx.page Begin Render 11.77462541 0.000013
aspx.page End Render 15.10157813 3.326953
we are trying to understand if there is any rationale behind this. Pls help me understand this.
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 Reflector 的说法,这两个事件之间发生的唯一事情是一些构建与跟踪输出一起使用的控制树的代码 (BuildPageProfileTree)。此代码仅在启用跟踪时运行。以下是该页面的 ProcessRequestMain 例程中的相关部分:
因此,具有讽刺意味的是,您在上面看到的速度下降是由于您正在跟踪页面这一事实引起的,如果禁用跟踪,则不会出现这种情况。
According to Reflector, the only thing happening between those two events is some code that builds the control tree used with tracing output (BuildPageProfileTree). This code only runs if tracing is enabled. Here's the relevant section from the ProcessRequestMain routine for the page:
So, ironically, the slowdown you see above is caused by the fact that you are tracing your page, and would not be there if tracing was disabled.