MVC Miniprofiler, where did all the extra time go?

2019-06-06 16:50发布

问题:

I'm using MVC Mini Profiler to find why a extremely basic page is quite slow to render: when run locally it takes 700 ms to render just 12kb of html.

It shows that all of the actions are trivial (they don't even show unless I click the show trivial button), the longest is just 2.4 ms. But the "time from start" number jumps by around 100ms for each of these trivial actions called. What is using this time? Is there a miniprofiler option that can help show where this time was used?

EDIT: The extra time is possibly occurring in the MVC Pipeline - is there any way to profile this?

EDIT #2: Trying to precompile the views with <MvcBuildViews>true</MvcBuildViews> has not improved the performance

回答1:

It turns out that the correct answer was to upgrade from MiniProfiler 1.9 to 2.1 because that version can profile more parts of the MVC pipeline.