Does anyone know, is routing processing time valuable in a comparison with the total request time? Will there be a large performance difference between an application with 20 and 100 (probably more) routings? Will be grateful for a link with the routings mechanism description.
Take a look here. Please note that this is an old answer from 2008, but I would guess it still holds true. In particular note the bit about using named routes.
In other words, if you know which route you will be using, then you can jump straight to the correct route with code like this: RedirectToRoute("routeName", viewData);
and it won't waste time trawling through routes until it finds the correct one. This may seem a bit cumbersome, but it's better than hardcoding the routes as, if you change the way of generating your routes, this code will still work, whereas a hard coded route would break.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With