ASP.Net MVC 4路由/路由性能问题

性能问题与路由。

asp.net MVC 4应用程序需要更多时间来查找控制器本身。

我们的路线项目结构是area / controller / action / id

public static void RegisterRoutes(RouteCollection routes)

{
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            name: "Default2",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });

        routes.MapRoute(
            name: "Default",
            url: "{area}/{controller}/{action}/{id}",
            defaults: new { area = "QQQQQQQ", controller = "Home", action = "Index", id = UrlParameter.Optional });
    }

与查找视图不同,此路由对于所有请求(第二次,第三次等)大致需要相同的时间

在这里输入图像描述

链接地址: http://www.djcxy.com/p/46537.html

上一篇: ASP.Net MVC 4 Route/Routing performance issue

下一篇: Is there any difference in performance when I use constraints in ASP MVC routes?