Hi,
I've done some profiling in my application, and it seems that when doing multiple subsequent find()s to the same ActiveRecord class, there's a big performance penalty for the first call.
I'm doing 15 find() calls, each with a record ID as single argument ($this->User->find( $some_ID) ), and the timings look like this:
fast_listing_findUser_0_time=979.326 msec
fast_listing_findUser_1_time=24.116 msec
fast_listing_findUser_2_time=24.5121 msec
fast_listing_findUser_3_time=24.1258 msec
fast_listing_findUser_4_time=24.1451 msec
fast_listing_findUser_5_time=24.122 msec
fast_listing_findUser_6_time=25.4791 msec
fast_listing_findUser_7_time=27.3218 msec
fast_listing_findUser_8_time=32.3861 msec
fast_listing_findUser_9_time=29.2711 msec
fast_listing_findUser_10_time=25.63 msec
fast_listing_findUser_11_time=24.539 msec
fast_listing_findUser_12_time=24.673 msec
fast_listing_findUser_13_time=29.3739 msec
fast_listing_findUser_14_time=27.6229 msec
So the first call takes about 30-40 times longer than the others.
Any idea what could be the reason for this delay?
How may I get rid of it?
Cheers,
Tom
Akelos does not cache database column schema on development mode and that makes it slow when loading a model for the first time.
On production mode (not on console apps) it will cache the schema to improve performance.
1 to 5 of 5