Are there any performance issues with registering a number of routes with the routing engine in ASP.NET MVC 2? What I am planning on doing is registered one route per page for content pages that are not categories. In other words, for pages like this there would be one route registered for each one:
- /Home/About
- /Home/Contact
- /Home/Directions
- /Home/Meet-Our-Staff
While there are a number of these pages there aren't hundreds of them. Having an explicit route is useful because the third parameter to RoutCollection.MapRoute is "object defaults" and it can be used to hold some backend information related to the URL.
One alternative is to let requests for these URLs fall through to a default route which would do some lookups based on the URL (to get the same information as stored via "object defaults") and then follow the same code path to display the page. I prefer the first option as I think it is cleaner than parsing the URL and has performance advantages due to "object defaults".