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?
They would be, along with many hundreds or thousands of other objects created for the request: strings, request related objects (parsed headers, cookies etc). A few model objects are neither here nor there in the grand of scheme. For me this falls into the category of premature optimization. If you really do end up serving millions of daily hits on your homepage then you'll get a far bigger win from caching than from skimping on a few instance variables