[Mongrel] [PIMP] Topfunky's httperf PeepCode screencast (Zed A. Shaw)

Jim Powers rancor at mindspring.com
Wed Mar 7 08:21:33 EST 2007


On Tue, 06 Mar 2007 11:12:00 -0800
Steve Midgley <public at misuse.org> wrote:

> Thanks Zed - this is very interesting. One item in particular caught
> my eye: Does anyone on this list have any comments or validation that 
> Rails 1.2.1 is 2-4 times as slow as Rails 1.1.6? Topfunky provided a 
> link that purports what looks like really horrible performance and 
> memory characteristics for Rails 1.2.1, even v. 1.1.6:
> 
> http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading-frameworks/
> 
> Did Rails 1.2.2 fix anything in this regard? (I didn't see any
> mention of performance improvements in the dev notes).
> 
> There were some nice feature upgrades in 1.2.1 that I'm using, but it 
> would be great to know that performance is now a real issue (and 
> rolling back would fix it).

I have been doing my own investigations into this issue, in particular,
I'm looking for at least one cause of an unacceptable slowdown that I
have been encountering (I will now go back and redo the tests under
1.1.6 for comparison).  In particular I've been observing *really poor*
performance with ActiveRecord.  In particular, when I run with the
profiler I'm seeing a stunning number of calls to the inflector methods.

Here "my" deal:

I have a class that only inherits from ActiveRecord so I get some SQL
logging.  It actually is using the driver directly (in this case
unixODBC) because I am calling a stored procedure that returns multiple
result sets (something ActiveRecord cannot do). So I have a "find"
method that returns a simple collection of hashes, nothing more.  I
benchmarked 100 calls and found that the inflector methods were the
overall most time consuming part of the effort with over 40K calls!
Now, the stuff returned form the 'find' call are not even derived from
ActiveRecord so I would expect a total of 0 (zero) such calls.

The best I can tell is that there must be a whole lotta new after
filters in 1.2.x doing lots of Rails magic.

Still investigating.

Jim Powers


More information about the Mongrel-users mailing list