have you checked your console when a request is comming to your server? of course you did.
request blah blah…
pages/_page_rows
render mechanism is just “read” this as file and return this as html
do you think reading a file is faster then getting views through helper?
i dont think so, but your experience would be appreciated here
to prove im wrong.
_page_rows.html.erb vs application_helper.rb (def render_rows; etc.. end)
let me know your experience, eg. using ‘ab’ ?
feel free to comment!
Filed under: om ruby asline nang bogor (baca ruby on rails) |
my client has proved this, but i think i must prove this by my self..i’ll post a comparable result later…
i personally always avoid helper, especially if we have a lot of rhtml with {if then else} logic on there, it’s hard to read, also often make our code looks dirty
i don’t know about speed, but since render partial is a page not a method, AFAIK we can cache it, btw do you know somee tools to benchmark something like this ?