On Jul 13, 2012, at 1:35 AM, Raphael Sofaer wrote: > Hi Vivek, > > On Fri, Jul 13, 2012 at 12:55 AM, Vivek Sampara <[email protected]> > wrote: >> Raphael , >> >> The only thing thats causing this delay is because of the query ( 250+ IN >> conditions ). I would normally write a def in the model and do the >> conditions part there. >> > > That query is a result of the include clause in the query for pipette > pulls, and it takes pretty much no time at all. There aren't any > conditions, everyone can see all of these records. Taking out the > include would just split that query up, and query itself is pretty > much instantaneous. Even instantiating 300 AR objects doesn't take a > second, let alone multiple seconds. When I do the query and print out > the objects and related objects in the console, it takes much less > than a second. I'm pretty sure that whatever is happening is > happening in the views. Can Hobo give me a per-partial (or Hobo > equivalent) breakdown of the time spent?
I don't recall anything like that out-of-the-box, but you could try doing something like this, someplace in the DRYML: <% benchmark 'Some Label' do %> ... view code ... <% end %> This is an ActiveSupport helper that will print out the specified message along with the time taken inside the block. I suspect the hotspot's in table-plus someplace, but I can't think of where it would be bad offhand. You might also want to try out NewRelic - they've got a free version with all the features for the first 14 days. It's been a while since I used them on an app with DRYML views, but they've got some pretty solid benchmarking stuff and will provide at least *some* insight. I'll see what I can reproduce over here this weekend. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
