我的MVC控制器出現了一些奇怪的性能問題,或者說在它之前?什麼[ASP.net] MVC做我的控制器之前?
根據Mini Profiler輸出,在到達控制器之前有120ms的開銷。
有誰知道這是爲什麼?這是在服務器上(不是本地),它有Compilation debug=false
集,所以它不是在release
模式下沒有運行的問題。
之後的一切,我可以調整/修改,但在它之前呢?我迷失了..
想法??
更新
後,我整個enter link description here & enter link description here來到一些性能工具這就造成了如下:
最貴棧 -------- ---------------------------- System.Web.HttpApplication + CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute System.Web.HttpApplication.ExecuteStep System.Web.HttpApplication + PipelineStepManager.ResumeSteps System.Web.HttpApplication.BeginProcessRequestNotification System.Web.HttpRuntime.ProcessRequestNotificationPrivate System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper System.Web.Hosting .PipelineRuntime.ProcessRequestNotification System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper System.Web.Hosting.PipelineRuntime.ProcessRequestNotification ===>費用(1716011)
Microsoft.Pra ctices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp 微軟。 Practices.ObjectBuilder2.BuilderContext.NewBuildUp Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp 微軟。 Practices.ObjectBuilder2.StrategyChain.ExecuteBuildU p Microsoft.Practices.Unity.UnityContainer.DoBuildUp Microsoft.Practices.Unity.UnityContainer.DoBuildUp System.Web.Mvc.DefaultControllerFactory + DefaultControllerActivator.Create System.Web.Mvc.DefaultControllerFactory.CreateController System.Web.Mvc。 MvcHandler.ProcessRequestInit System.Web.Mvc.MvcHandler + <> c__DisplayClass6.b__2 System.Web.Mvc.SecurityUtil + <> c__DisplayClassb`1.b__a System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust System.Web.HttpApplication + CallHandlerExecutionStep。 System.Web.HttpApplication.IExecutionStep.Execute 系統。Web.HttpApplication.ExecuteStep System.Web.HttpApplication + PipelineStepManager.ResumeSteps System.Web.HttpApplication.BeginProcessRequestNotification System.Web.HttpRuntime.ProcessRequestNotificationPrivate System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper System.Web.Hosting.PipelineRuntime。 ProcessRequestNotification System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper System.Web.Hosting.PipelineRuntime.ProcessRequestNotification ===>費用(936006)
Microsoft.Win32.Win32Native。 CoCreateGuid StackExchange.Profiling.Timing..ctor StackExchange.Profiling.MVCHelpers.ProfilingViewEngine.Find System.Web.Mvc.ViewEngineCollection + <> c__DisplayClassc.b__a System.Web.Mvc.ViewEngineCollection.Find System.Web.Mvc.ViewEngineCollection .Find System.Web.Mvc.ViewResult.FindView System.Web.Mvc.ViewResultBase.ExecuteResult System.Web.Mvc.ControllerActionInvoker + <> c__DisplayClass1c.b__19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter 的System.Web。 Mvc.ControllerActionInvoker.InvokeActionResultFilter System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters System.Web.Mvc.ControllerActionInvoker.InvokeAction System.Web.Mvc.Controller.ExecuteCore System.Web.Mvc.ControllerBase.Execute System.Web.Mvc.MvcHandler + <> c__DisplayClass6 + <> c__DisplayClassb.b__5 的System.Web .Mvc.Async.AsyncResultWrapper + <> c__DisplayClass1.b__0 System.Web.Mvc.MvcHandler + <> c__DisplayClasse.b__d System.Web.HttpApplication + CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute System.Web.HttpApplication.ExecuteStep System.Web.HttpApplication + PipelineStepManager.ResumeSteps System.Web.HttpApplication.BeginProcessRequestNotification System.Web.HttpRuntime.ProcessRequestNotificationPrivate System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper System.Web.Hosting.PipelineRuntime.ProcessRequestNotification System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper 系統.Web.Hosting.PipelineRuntime.ProcessRequestNotification ===>成本(780005)
能團結是造成一些問題?
這是否延遲發生與其他控制器太或者只有這個延遲? – Alex
它只發生在這個特定的控制器上,我的另一個控制器調用相同的BL(這和其他周邊邏輯)相比要快得多! –
我看到了...我期待一致的行爲,並且要指向服務器本身,但是現在我處於虧損狀態 – Alex