如何使用MiniProfiler确定ASP MVC Razor配置文件

时间:2013-09-15 14:54:01

标签: asp.net-mvc razor mvc-mini-profiler razorengine

我的ASP MVC 4 Web应用程序中有一些视图需要几秒钟才能渲染。 我安装了MiniProfiler来分析控制器和Razor视图。 在我的一个观点中,我看到以下结果:

                                             duration (ms)  from start (ms)
http://localhost:51405/Surveys/Details/201306...        4.8 +0.0    
  Controller: SurveysController.Details         2.2 +4.4    
   GetViewRows survey_with_tenant               6.1 +4.5    
   GetDocuments                                 5.7 +11.4   
   GetViewRows employees_by_surveyid            33.2    +17.2   
   GetDocuments                                 7.3 +51.4   
  Render : Details                              1015.9  +59.4 <--- This is the problem
       Render partial: _LoginPartial            2.6 +450.2

倒数第二行显示渲染详细信息Razor视图需要1015毫秒。其中使用的部分需要2.6秒,还有其他部分,但它们甚至低于1毫秒。

如何进一步调查渲染时间超过1秒?

0 个答案:

没有答案