Fernando Perez wrote:
> I have made a lot of tests myself, and the slowness of Rails comes from:

...

> - ActiveRecord which creates objects from everything returned from DB.

I did notice a plugin which attempts to combat this--slim_attributes [1] 
and also hash_extension [3]

> - using :include with AR

No help there :)

> - using view helpers such as link_to and that kind of crap

Recently found one treating this subject, as well [though it's may not 
be that polished] [2].

> - coding practices from former php coders
> - plugins that do too much introspection like permalink_fu which can be 
> hardcoced in only 3 lines in the model.
> - people forgetting about caching
> - ...
> 
> By refactoring my code very frequently and keeping an eye on what SQL 
> queries AR creates, I can increase my app's performance by x5 on some 
> critical processing. My biggest increase was actually x1000 by working 
> on tuning the DB with a very big table of 100k rows.

Interesting, so it's AR loading that was troublesome.

Well with the release of 2.2 and some non blocking IO drivers [4] 
hopefully it will put some more focus on speed, since there will no 
longer be an excuse of "well all the latency is caused by IO" I  hope :)

Thanks all!
-=R

[1] http://pennysmalls.com/2008/04/02/speed-up-mysql-in-rails/
[2] 
http://railsexpress.de/blog/articles/2006/08/15/rails-template-optimizer-beta-test
[3] 
http://blog.chak.org/2008/01/22/activerecord-is-slow-hashes-are-fast/#comment-81
[4] 
http://www.rubyinside.com/mysqlplus-non-blocking-mysql-driver-for-ruby-1138.html
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to