Forum: Ruby on Rails Check the performance of helpers

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.
Nike M. (Guest)
on 2009-02-19 12:46
how to check the performance of helpers.

For ex if am using content_tag for creating li instead of writing
<li></li> directly.I want to check how much time content_tag will take
time to excute as <li></li>
Matt J. (Guest)
on 2009-02-20 03:43
(Received via mailing list)
You could probably set up a benchmark, but the more important question
is: WHY?
Worrying about something that probably takes a couple extra
microseconds isn't
likely to yield any benefit, unless you're rendering thousands of
elements.

...and if you're doing that, you probably need to look into some
pagination, not the
performance implications of content_tag.

--Matt J.

On Feb 19, 5:46 am, Nike M. <removed_email_address@domain.invalid>
Nike M. (Guest)
on 2009-02-20 06:45
Matt J. wrote:
> You could probably set up a benchmark, but the more important question
> is: WHY?
> Worrying about something that probably takes a couple extra
> microseconds isn't
> likely to yield any benefit, unless you're rendering thousands of
> elements.
>
> ...and if you're doing that, you probably need to look into some
> pagination, not the
> performance implications of content_tag.
>
> --Matt J.
>
> On Feb 19, 5:46�am, Nike M. <removed_email_address@domain.invalid>

Thanks
This topic is locked and can not be replied to.