On Thu, Dec 9, 2010 at 10:23 AM, Victor Cisneiros <li...@ruby-forum.com> wrote:
> Sorry I have never used any profiler tool, I just read here
> (http://www.infoq.com/articles/Rails-Performance) that the link_to
> helper can be slow and tried removing it

Have you tried erubis? It says to be 10 times faster than ERB. erubis
has a feature that you can preprocess your template code to be just
evaluated one time. Check section 5.2 in
http://www.kuwata-lab.com/erubis/users-guide.05.html#topics-rails.

Has anyone used erubis? I'm curious if using it really brings all this
performance improvement.

>
> I suggest you look at the logs to determine if it's the rendering or the
> activerecord that is causing the performance problems in your
> application
>
> If your database is too big (hundreds of thousands of rows) your queries
> may run slow if they are not using the indexes. Use EXPLAIN + the sql to
> verify if the indexes are being used
>
> You may also need to use includes or joins to avoid too many queries.
> The infoq link i posted before explain how to do this
>
> If the problem is in the rendering try removing some of the helpers such
> as link_to and check if performance improves. You may also use fragment
> caching to speed up
>
> There's also this page in the rails guides about profilers. I've never
> used it so I don't know if it helps
> http://guides.rubyonrails.org/performance_testing.html
>
> And also this railscast
> http://railscasts.com/episodes/161-three-profiling-tools
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to