无法计算asp.net页面上的加载时间

无法计算asp.net页面上的加载时间,asp.net,performance,Asp.net,Performance,我试图找到我的加载时间被消耗在哪里。我已经将跟踪添加到我能想到的几乎所有内容中,并且缺少了200ms(占总负载的50%以上) 我怎样才能解释这次错过的时间 Description Duration(ms) with Children(ms) from start(ms) http://localhost:80/default.aspx 320.8 357.3 +0.0 CreateControl

我试图找到我的加载时间被消耗在哪里。我已经将跟踪添加到我能想到的几乎所有内容中,并且缺少了200ms(占总负载的50%以上)

我怎样才能解释这次错过的时间

 Description                        Duration(ms) with Children(ms)  from start(ms)
  http://localhost:80/default.aspx   320.8        357.3              +0.0
  CreateControlCollection            0.0          0.0                +27.2
  OnPreInit                          0.1          0.1                +27.2
  GetVaryByCustomString              0.0          0.0                +227.0
  Control OnInit                     0.0          0.0                +232.4
  Control OnInit                     0.0          0.0                +232.4
  Control OnInit                     0.0          0.0                +234.2
  Control OnInit                     0.0          0.0                +234.2
  Control OnInit                     0.0          0.0                +234.2
  GetVaryByCustomString              0.0          0.0                +234.6
  Control OnInit                     0.0          0.0                +234.9
  Control OnInit                     0.0          0.0                +234.9
  GetVaryByCustomString              0.0          0.0                +235.0
  GetVaryByCustomString              0.0          0.0                +235.3

对于控件,似乎在PreInit(仅限页面的事件)和Init之间消耗了未计算的时间。一些想法:

  • 控件初始化可能是罪魁祸首。控件初始化事件在控件初始化完成后而不是之前触发
  • 您使用的是ASP.NET主题还是外观?如果是,则在PreInit和Init之间应用它们
  • 请记住,Init事件是自下而上触发的;孩子先于父母
  • 线程问题可能是造成时间间隔的原因之一。您的测量值是否来自其他闲置系统?在页面生命周期的早期是否有任何I/O操作发生
  • 你在使用母版页吗?如果是这样,请记住它们是作为页面的子控件实现的