Ruby on Rails Sunday, March 31, 2013

Hey folks:

In a rails app I'm building, the home page will have two forms:  one to sign-up for an account, another one to sign-in to an existing account.

Now, if I were to use object form helpers to build these forms, the controller for the homepage would need to create instances of the relevant models each time someone visits the homepage.

This concerns me a bit, because a visitor to the home page may or may not end up using either the sign-up or sign-in forms.  For instance, they may instead click a link that gives a "tour" of the app.  If they do so, will the instance variables created by the controller in anticipation of the POTENTIAL use of the forms be garbage-collected?

I'm just thinking about efficiency here -- don't want to have a bunch of extra instance variables taking up space in the runtime memory just for the sake of the (slight) convenience of using model object forms helpers rather than plain-vanilla form handlers.


You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment