BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Article: A Look at Common Performance Problems in Rails

by Obie Fernandez on Jun 13, 2006 |

Rails performance expert Dr. Stefan Kaes takes a look at the most common performance issues in your Rails applications and what to do about them. Advice is given regarding benchmarking, choosing a session container, caching results of expensive computations, optimizing database queries and working effectively with view helpers.


Read: A Look at Common Performance Problems in Rails

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Real World Experiences? by Obie Fernandez

We'd love to hear from any folks putting Stefan's suggestions into practice.

Updated article by Obie Fernandez

The initial publication of this article and related feed snippets incorrectly identified Stefan as a member of the Rails core team. This was my editorial mistake and I apologize for any confusion caused.

good article by Michael Kovacs

Thanks Stefan for this article. Lots of good information here that will come in handy once I'm ready to tune for perf.

Very Useful! by Geoffrey Grosenbach

Very practical and useful. Thanks!

Great Practicle Information by Ben Askins

For me this article is a lamp in the dark pointing out little obstacles I wouldn't otherwise have noticed. Thanks Stefan.

memcache-client author by Eric Hodel

Bob Cottrell wrote memcache-client, I just packaged it up and released it.

Getting Memcache-Client to work with Sessions by Adam Michaels

Does anyone have a link to a tutorial or have an idea how to get Memcache-Client to work with Rails sessions seeing as its the prefered ruby client.

32 percent... by chris hulbert

I just spent today putting into practice I just spent today putting into practice most of the ideas suggested here, especially caching using class variables, memcached sessions, and not using slow helpers.
With extensive testing, my production server now serves up pages 31.8% faster!
63.8 seconds versus 93.5 to complete a test suite i created.
Very happy :)
Chris - splinter.com.au

Re: Getting Memcache-Client to work with Sessions by chris hulbert

Re: Getting Memcache-Client to work with Sessions by Geoffrey Grosenbach

I did a straight copy and tweak of the Rails MemcacheStore to work with memcache-client, here:

topfunky.net/svn/plugins/db_memcache_store/lib/...

optimizing queries... by Boing Boinger

consider cache-fu. little in the way of docs at this point, but it's a good activerecord cache...

errtheblog.com/static/pdfs/memcached.pdf

'Include' can improve performance? by Zhenbo Hu

I tried, but it seems no performance improvement at all.

tell ActiveRecord what you don not want to select from database by rafael magana

some days ago I made a patch to add a :noselect option to use with the ActiveRecord::find method:

let's say you have a table with 5 columns, and you want to select 4 of them:

User.first(:select => "col_1, col_2, col_3, col_4")

with my patch you can do this:

User.first(:noselect => "col_5")

maybe it's not a big improvement in speed but it can help in tables with a bunch of columns. well that's it.

here's the post where I explain a little bit more how it works and the link to the patch: bit.ly/cIt4pa

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

13 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT