Topic: Has anyone benchmark the use of helpers

At the moment I am taking code from my views and putting it into helpers. Great for understanding and maintaining  my views, but using helpers for the same code must take longer to load.
Has anyone done any benchmark to see whether it takes microseconds or milliseconds extra to load.

Re: Has anyone benchmark the use of helpers

Any time difference is likely inconsequential,  but helpers could in fact improve overall performance.  Don't assume they automatically add overhead.  It depends on many things.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Has anyone benchmark the use of helpers

Thanks for that reply. I would still like to know the speed difference.
Others have suggested caching is far more important to speed.
http://guides.rubyonrails.org/caching_with_rails.html
I have not used caching as yet, but will look into it.

Re: Has anyone benchmark the use of helpers

Yea,  like I said,  helper laden apps vs. helper sparse apps won't affect your app's perceived performance in any significant way.

BUT,  it could affect your app's SCALABILITY?

OK,  even this probably isn't worth pursuing, like you said, page caching is time MUCH better spent.

But, if you take an app with NO helpers and TONS of repetitive cut and past code and profile it.

Then, you DRY that app out with extensive helpers, and profile it.

What's the difference?

The DRYer app will occupy a smaller memory footprint,  but have more subroutine calls.

The Wet app will occupy a larger memory foot print,  but have less subroutine calls.

Which is better?

Depends,  no clear answer.  Only hard core benchmarking would tell, and it would be very app specific.  If you're really interesting,  become a compiler optimization expert :>

Bottom Line:

Helpers are there to keep your view code pretty and concise. ANY other use of helpers is not endorsed or encouraged by the manufacturer!

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.