News for hackers. Stuff that matters.
Re:High Performance Rails by tomfakes on Friday May 31, 2013 @10:22PM (#5802355)
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.

There are no comments on this comment yet.