I have a page that does a lot of calculations...that for some reason takes 19 seconds to load when running in my development environment. Looking at my logs I can see Rendering took .8 seconds and the DB took 2.38 seconds: Completed in 19.81708 (0 reqs/sec) | Rendering: 0.80910 (4%) | DB: 2.38379 (12%) | 200 OK [http://wldev.kuliksco.com/compounds] where is the rest of the time coming from? is this time when the cpu is chugging away doing calculations? I don''t think it would be a bandwidth issue since I''m testing from the same router/subnet. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 26, 2009, at 12:32 PM, Scott Kulik wrote:> I have a page that does a lot of calculations...that for some reason > takes 19 seconds to load when running in my development environment. > > Looking at my logs I can see Rendering took .8 seconds and the DB took > 2.38 seconds: > > Completed in 19.81708 (0 reqs/sec) | Rendering: 0.80910 (4%) | DB: > 2.38379 (12%) | 200 OK [http://wldev.kuliksco.com/compounds] > > where is the rest of the time coming from? is this time when the > cpu is > chugging away doing calculations? I don''t think it would be a > bandwidth > issue since I''m testing from the same router/subnet. > --Yes, the remaining 16.62419 seconds are your code heating up the CPU. (Of course, not all of what falls outside of Rendering and DB is necessarily code written by you, but you''d have to instrument your code to find out more details.) You can try New Relic''s Rails Performance Monitor [1] to find out some of those details. [1] http://newrelic.com/get-RPM.html -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rob Biedenharn wrote:> You can try New Relic''s Rails Performance Monitor [1] to find out some > of those details. > > [1] http://newrelic.com/get-RPM.html > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.orgthanks rob! i just installed the plugin and I can see where all the cpu is going. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
And where was it going? ;-) dwh Scott Kulik wrote:> Rob Biedenharn wrote: > >> You can try New Relic''s Rails Performance Monitor [1] to find out some >> of those details. >> > thanks rob! i just installed the plugin and I can see where all the cpu > is going. >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Denis Haskin wrote:> And where was it going? ;-) > > dwhi had some cpu intensive code to validate the items on the page and i screwed up the query so it was running the code on all 7000 rows in the table instead of just the 50 displayed on current page. doh! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---