Is there a cost to using partials?

Following up on this interesting post (Rails - Does using partials slow views rendering? - Software Engineering Stack Exchange), what do you guys think of the cost of rendering a partial? For example, I have a search page that is showing 50 results. I had each result as a partial and additional partials in that “parent” partial (meaning many, many render calls on the single page). Any thoughts on whether partials should be used with restraint due to any time cost? For small traffic websites, this isn’t a big deal, but what about for high traffic sites?

Thanks!

Especially when used with caching, I don’t think they’re a big enough performance hit to be worried about. Partial rendering takes a couple milliseconds according to my New Relic reports.

DHH talks about how basecamp got so fast, and part of it involves using, and caching partials.

There’s a cost, and it’s non-trivial. However, if the difference between using a partial and not is significant enough to affect your application, you probably shouldn’t be using Ruby or Rails in the first place. Chances are, using partials isn’t going to be your bottleneck.