23 Feb '12, 5pm

Blog post: Quick dive into ORM object initialization or what's going on when you initialize an AR model

Blog post: Quick dive into ORM object initialization or what's going on when you initialize an AR model

This is quite a scary graph but it shows nicely the features you are getting and their cost associated. For instance, the option of having the before and after initialization callback cost you 14% of your CPU time per instantiation, even though you probably almost never use these callbacks. I’m reading that by interpreting the node called ActiveSupport::Callback#run_callbacks, 3rd level from the top. So 14.1% of the CPU time is spent trying to run callbacks. As a quick note, note that 90.1% of the CPU time is spent initializing objects, the rest is spent in the loop and in the garbage collection (because the profiler runs many loops). You can then follow the code and see how the code works, creating a dynamic class callback method on the fly (the one with the long name) and then recreating the name of this callback to call it each time the object is allocated. It sounds li...

Full article: http://merbist.com/2012/02/23/quick-dive-into-ruby-orm-ob...

Tweets

On Ruby: Real World Performance Profiling:

on-ruby.blogspot.com 23 Feb '12, 8pm

It looks like my post on Ruby 1.9.0 performance is drawing some criticism over on on reddit . I already updated the origin...

No automatic by-election in our model of parlia...

todayonline.com 23 Feb '12, 9pm

Assistant Professor Eugene Tan's commentary "The value of a by-election" (Feb 20) argued that the Prime Minister does not ...

True to my name: 2x Lupo EL (1060 kg/2337 lb) =...

teslamotors.com 02 Mar '12, 5am

Additional Dimensions Front head room: 39.8" Rear head room: 36.6" Front leg room: 42.0" Rear leg room: 36.7" Front should...