I have several partials containing dynamic codes (already memcached all the fragments as best I could), which I reuse ( render :partial => "stuff.rhtml" ) a lot within a single action call. For example, I have a partial which defines how an entry is to be formated in HTML. I have 40 entries on a page, so the partial is rendered 40 times in a single action. Not knowing the innerworking of Rails, I have several questions. 1) Within that single action call, is the file _stuff.rhtml read from the file system just once or 40 times? 2) Does the file _stuff.rhtml gets compiled or cached somewhere? I am asking this because when I play with DRYML, it seems that its equivalence of partials get cached somehow. 3) If _stuff.rhtml read from file system 40 times in the action call, should I rather convert this into a helper? Since, helper is cached? Thanks!
on 2007-07-16 09:53