Hi,
I have a controller action which is taking 10 seconds to run. Most of
the time is being spent in a view which is a large file.(more than 1500
lines). How shall I go about debugging the speed issue?

--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Neethu Satheesh at Feb 3, 2012 at 9:57 am
    Hi Srimanta,

    You can debug this using the method benchmark at various points of the
    code to find where it is taking time in models, controllers and in
    views.

    Explore more in
    http://guides.rubyonrails.org/performance_testing.html#helper-methods

    Lines of code is not always proportional to the speed of the
    execution of the code, but quality is.

    - Neethu

    --
    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-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Srimanta Chakraborty at Feb 3, 2012 at 10:07 am

    Neethu Satheesh wrote in post #1043873:
    Hi Srimanta,

    You can debug this using the method benchmark at various points of the
    code to find where it is taking time in models, controllers and in
    views.

    Explore more in
    http://guides.rubyonrails.org/performance_testing.html#helper-methods

    Lines of code is not always proportional to the speed of the
    execution of the code, but quality is.

    - Neethu
    Hi Neethu,
    Thanks once again

    --
    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-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Jeffrey L. Taylor at Feb 3, 2012 at 4:36 pm

    Quoting Srimanta Chakraborty <lists@ruby-forum.com>:
    Hi,
    I have a controller action which is taking 10 seconds to run. Most of
    the time is being spent in a view which is a large file.(more than 1500
    lines). How shall I go about debugging the speed issue?
    Profile it. See which methods are being called, how often, etc. Google
    "profile rails request".

    Jeffrey

    --
    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-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 3, '12 at 9:39a
activeFeb 3, '12 at 4:36p
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase