2 ms·
The first form generates a method at startup time that can be pre-configured to do all the work necessary. The second form has to perform a pattern match with
by tomfakes 13y ago
The first form generates a method at startup time that can be pre-configured to do all the work necessary.
The second form has to perform a pattern match with the controller and action names to work out which method to call, and then call the method generated by the first form.
This extra pattern match is the overhead, and with thousands of routes, it clearly adds up.
Always use named routes - the first form.