Forum: Ruby on Rails Generating routes on demand

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
582034b63279abeaa8e76acf12f5ee30?d=identicon&s=25 Drogomir (Guest)
on 2009-03-12 14:18
(Received via mailing list)
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?
This topic is locked and can not be replied to.