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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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. > > - NeethuHi 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Quoting Srimanta Chakraborty <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.