Generating routes on demand


#1

Hi,

I have problem with routes. It’s the big one (over 50 resources) and
starting an app is a pain - 3-4 seconds. I’ve added :only and :except
options where I could and it’s better than at the beginning but
still… slow.

I use passenger to deploy apps, so fast boot is important. I thought
that most of the routes are not used often anyway (especially those
from admin/) and in most cases while instance is running (and while
passenger stops app after 5 minute idle time) most of the routes are
not used… Generation on demand would fix this problem.

For example: I call user_path(@user) and it doesn’t exist so it’s
generated and is available with next requests.

Is this doable? Or maybe there is some plugin which makes the trick?