[LRUG] Fwd: Recommendations for Ruby & Rails optimisation resources
Jonathon Horsman
jonathon at arctickiwi.com
Mon Nov 26 05:14:23 PST 2012
Thanks for all the suggestions.
I've added the new relic gem and looked at the results, which seem a bit
light on details unless I'm missing something.
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?
However there doesn't seem to be any way to drill into this and isolate
what is taking the time.
I should mention a table is being rendered with 363 rows is being rendered,
and the total page size is 338kb of HTML.
Are there other tools which can measure metrics?
Many thanks
On 23 November 2012 18:52, Sam Livingston-Gray <geeksam at gmail.com> wrote:
> Forgot to reply to list for posterity.
>
>
> --
> (Sent from phone; please excuse brevity.)
>
> Begin forwarded message:
>
> *From:* Sam Livingston-Gray <geeksam at gmail.com>
> *Date:* November 23, 2012 8:44:29 AM PST
> *To:* Jonathon Horsman <jonathon at arctickiwi.com>
>
> *Subject:* *Re: [LRUG] Recommendations for Ruby & Rails optimisation
> resources*
>
> 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.)
>
> --
> (Sent from phone; please excuse brevity.)
>
> On Nov 23, 2012, at 4:14 AM, Jonathon Horsman <jonathon at arctickiwi.com>
> wrote:
>
> Hi
>
> I need to improve the performance of a particular Rails action.
>
> I'm using fragment caching which is helping a lot, but the initial cache
> generation is still in the order of 5 seconds.
>
> So I'm looking into the garbage collector, this article provided some
> hints but no suggestions:
> http://merbist.com/2010/07/29/object-allocation-why-you-should-care/
>
> 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?
> Is it better to use select_all and work directly with hashes?
>
> Is HAML markedly slower than ERB? The view generation seems to take the
> majority of time.
>
> I'd really appreciate any tips or links to articles.
>
> Many thanks
>
> --
> Jonathon Horsman
> Director
> Arctic Kiwi
> Mobile: 079 42366038
> Web: http://www.arctickiwi.com
> Twitter: @jhorsman <http://www.twitter.com/jhorsman>
>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
--
Jonathon Horsman
Director
Arctic Kiwi
Mobile: 079 42366038
Web: http://www.arctickiwi.com
Twitter: @jhorsman <http://www.twitter.com/jhorsman>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20121126/37f4c80b/attachment-0003.html>
More information about the Chat
mailing list