Topic: Performance of ActiveRecord
I'm fetching data using a quite simple query with many outer joins.
The query itself executes in about 16ms on the db, which is faster than I need.
However, the resultset contains about 1200 rows (due to the many outer joins) with about 100 columns in each row and instantiating the according objects by ActiveRecord takes forever (about 5 seconds). Furthermore my impression is that ActiveRecord instantiates the same objects over and over again (without using an efficient first level cache, indexed by the object's class and id), so that fetching the data without the outer joins and linking the puzzle manually is actually faster. But of course this is a non-solution.
Is there any tutorial on optimizing ActiveRecord's performance available ?