Thanks for all the suggestions.<div><br></div><div>I've added the new relic gem and looked at the results, which seem a bit light on details unless I'm missing something.</div><div><br></div><div>According to the results of the slow action, SQL is about 8% of the time and the action itself is 89% (2799ms). Presumably this is mostly the view?<br>
</div><div><br></div><div>However there doesn't seem to be any way to drill into this and isolate what is taking the time.</div><div><br></div><div>I should mention a table is being rendered with 363 rows is being rendered, and the total page size is 338kb of HTML.</div>
<div><br></div><div>Are there other tools which can measure metrics?</div><div><br></div><div>Many thanks</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 November 2012 18:52, Sam Livingston-Gray <span dir="ltr"><<a href="mailto:geeksam@gmail.com" target="_blank">geeksam@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF"><div>Forgot to reply to list for posterity.<div class="im"><br><br><div>--</div>(Sent from phone; please excuse brevity.)</div>
</div><div><br>Begin forwarded message:<br><br></div><blockquote type="cite"><div><b>From:</b> Sam Livingston-Gray <<a href="mailto:geeksam@gmail.com" target="_blank">geeksam@gmail.com</a>><br><b>Date:</b> November 23, 2012 8:44:29 AM PST<br>
<b>To:</b> Jonathon Horsman <<a href="mailto:jonathon@arctickiwi.com" target="_blank">jonathon@arctickiwi.com</a>><div class="im"><br><b>Subject:</b> <b>Re: [LRUG] Recommendations for Ruby & Rails optimisation resources</b><br>
<br></div></div></blockquote><div><div class="h5"><div></div><blockquote type="cite"><div><div>Without metrics, "optimisation"=="random guesses". I highly recommend NewRelic; you can install the gem and run it locally on your app in dev mode for free. It's great for finding low-hanging fruit. (They're a bunch of really nice people, too.)<br>
<br><div>--</div>(Sent from phone; please excuse brevity.)</div><div><br>On Nov 23, 2012, at 4:14 AM, Jonathon Horsman <<a href="mailto:jonathon@arctickiwi.com" target="_blank">jonathon@arctickiwi.com</a>> wrote:<br>
<br></div><div></div><blockquote type="cite"><div>Hi<div><br></div><div>I need to improve the performance of a particular Rails action.</div><div><br></div><div>I'm using fragment caching which is helping a lot, but the initial cache generation is still in the order of 5 seconds.</div>

<div><br></div><div>So I'm looking into the garbage collector, this article provided some hints but no suggestions: <a href="http://merbist.com/2010/07/29/object-allocation-why-you-should-care/" target="_blank">http://merbist.com/2010/07/29/object-allocation-why-you-should-care/</a></div>

<div><br></div><div>e.g. how do I reduce the amount of object allocation in Rails? Should I be using the select() method in ActiveRecord to reduce initialized fields?</div><div>Is it better to use select_all and work directly with hashes?</div>

<div><br></div><div>Is HAML markedly slower than ERB? The view generation seems to take the majority of time.</div><div><br></div><div>I'd really appreciate any tips or links to articles.</div><div><br></div><div>Many thanks<br clear="all">

<div><br></div>-- <br>Jonathon Horsman<br>Director<div>Arctic Kiwi<br>Mobile: 079 42366038<br>Web: <a style="color:rgb(0,153,0)" href="http://www.arctickiwi.com" target="_blank">http://www.arctickiwi.com</a><div>Twitter: <a style="color:rgb(0,153,0)" href="http://www.twitter.com/jhorsman" target="_blank">@jhorsman</a><br>

<img><br></div></div><br>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Chat mailing list</span><br><span><a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a></span><br>
<span><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></span><br></div></blockquote></div></blockquote></div></div></div><br>_______________________________________________<br>

Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jonathon Horsman<br>Director<div>Arctic Kiwi<br>Mobile: 079 42366038<br>Web: <a style="color:rgb(0,153,0)" href="http://www.arctickiwi.com" target="_blank">http://www.arctickiwi.com</a><div>
Twitter: <a style="color:rgb(0,153,0)" href="http://www.twitter.com/jhorsman" target="_blank">@jhorsman</a><br><img src="http://www.arctickiwi.com/images/arctic-kiwi-logo-email.gif"><br></div></div><br>
</div>