aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-09-28 10:37:28 -0400
committerSean Griffin <sean@seantheprogrammer.com>2015-09-28 10:42:09 -0400
commit3e408a2654727b49ee0e054e27a4f4ca199f72a7 (patch)
tree38a478f44d0a1b44e5165db50644702d0859afba /railties/test/application
parent58750422c57e0cdc7f0a4ab4030fb9a98ec0b9db (diff)
downloadrails-3e408a2654727b49ee0e054e27a4f4ca199f72a7.tar.gz
rails-3e408a2654727b49ee0e054e27a4f4ca199f72a7.tar.bz2
rails-3e408a2654727b49ee0e054e27a4f4ca199f72a7.zip
Speed up `Hash#transform_values` when empty
We're calling this function on an empty hash as part of copying the attribute set during dirty checking initialization. The new structure caused a performance regression on loading records from the database. This causes `User.all.to_a` to perform about 10% faster w/ 10k records. Calculating ------------------------------------- User.all - master 9.000 i/100ms User.all - sg-fix-ar-regression 8.000 i/100ms ------------------------------------------------- User.all - master 81.236 (± 7.4%) i/s - 405.000 User.all - sg-fix-ar-regression 89.716 (± 7.8%) i/s - 448.000
Diffstat (limited to 'railties/test/application')
0 files changed, 0 insertions, 0 deletions