3

我试图弄清楚如何使用 MiniProfile 来了解为什么某些网页运行速度如此之慢。我已经添加了它,并且添加了StepsaroundApplication_BeginRequestApplication_EndRequestaround 我的 Controllers 操作(在下图中是 CanManageOrganization 和 GenerateTreeDataSource)。但正如您在下面看到的,这两种方法运行速度相对较快。在那之后有一个很大的差距,直到GetVaryByCustomString被调用。我将如何尝试弄清楚发生了什么(时间花在了哪里)?

我的理解是,实际的渲染引擎会在该部分发生什么?我在这里不正确吗?关于如何弄清楚中间时间花在做什么的任何建议?

配置文件结果

4

1 回答 1

1

I would recommend you to install the MiniProfiler.MVC3 NuGet which will give you more specific details about MVC. Yoju will see time spent for finding and rendering views as well.

Here's a sample of what you might see:

enter image description here

Remark: with the latest version of the NuGet if you are hosting your application in IIS7 Integrated pipeline mode or IIS Express locally you might need to add the following handler to the <system.webServer> section:

<handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
于 2012-10-10T16:41:23.330 回答