QUESTION: Routing system scalability/best practices

Hello,

I was wondering if people have a sense of the performance scalability of
the routing system, in the number of map.connect statements. Is
execution time (or memory usage) of routing any more than linear in the
number of map.connects? I figure I’d ask before trying to
reverse-engineer all the code generation… :slight_smile:

On a related note, the reason I potentially have a lot of map.connects
is that I’d like my action names to be
fairly_descriptive_with_lots_of_underscores, whereas I want to keep my
URL forms much shorter. So I’m finding myself doing a lot of this sort
of thing:

map.connect ‘mycontroller/dosomething/:id’,
:controller => ‘my_controller’,
:action => ‘very_descriptive_name_for_doing_something’

So much so that my routes.rb now consists of defining a bunch of hashes
mapping the real action names to URL shortened action names, followed by
map.connect statements within Hash.each blocks. I’m okay with
maintaining such a mapping, but I’m curious whether the seasoned routing
gurus have determined that this would be bad practice, and if so if
there are any alternative techniques out there.

Thanks,
Daniel