ASP.Net MVC 4 Route/Routing performance issue
Performance issue with routing.
The asp.net MVC 4 application takes more time to find the controller itself.
Our project structure for route is 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 });
}
unlike the find view this routing takes approximately the same time for all the request(second time , third time and etc)
链接地址: http://www.djcxy.com/p/46538.html