• Have you tried benchmarking it? If you're checking a regexp against each url coming in, for every route in the list, that's going to be very slow if you add over 10 or so routes.

    You could either cache and/or use string prefix comparison to eliminate a lot of routes before actually evaluating the regexp.