1

I have some views in my ASP MVC 4 web application that take several seconds to render. I've install MiniProfiler to profile both the controllers and Razor views. In one of my views I see the following results:

                                             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

The second to last line show that it took 1015 ms to render Details Razor view. The partial used in it took 2.6 seconds, there are other partials but they are even bellow 1 ms.

How can I further investigate what takes over 1 second to render?

GraemeMiller
  • 11,973
  • 8
  • 57
  • 111
Ido Ran
  • 10,584
  • 17
  • 80
  • 143
  • `How can I further investigate what takes over 1 second to render?` maybe show your code? – Erik Philips Sep 16 '13 at 02:43
  • I agree that the problem is in the code, my question is how come the render step tool 1015ms while the inner parts took less than 40ms ? Where has the rest of the time went? – Ido Ran Sep 16 '13 at 09:15
  • 1
    Upon repeated requests, does that step's time stay that high? If not, it could just be the view's initial compilation from cshtml -> cs -> Temporary ASP.NET Files assembly. – Jarrod Dixon Sep 18 '13 at 21:52

0 Answers0