9253: Before writing a numeric attribute value, ActiveRecord does an imp...

Before writing a numeric attribute value, ActiveRecord does an implicit conversion (in activerecord/lib/active_record/connection_adapters/column.rb) of boolean types (true => 1 and false => 0). If the numeric value being assigned is a BigDecimal, then ActiveRecord compares a BigDecimal to true and false. This is known to be very slow in Ruby 1.9.3 (see http://www.ruby-forum.com/topic/4409452 and https://bugs.ruby-lang.org/issues/7645#change-35188). The Ruby core team has implemented a fix for this issue that will be included in Ruby 2, but they appear to have no intention of back-porting this fix to Ruby 1.9.3. In my case, the performance impact of this issue was enormous (200% - 300% performance hit) for some of the pages in my application.