rails/rails — pull request #12185 by SamSaffron (2013-09-10 02:43:50+00:00)
Title: Reduce allocations when extracting AR models

Similar to: https://github.com/rails/rails/pull/12065

Reduce the allocations when extracting rows from a join dependency

For a typical home page request at Discourse this reduced the objects allocated by 2000 and the memory allocated by 100k

(analyzed using https://github.com/SamSaffron/memory_profiler )

This is extremely safe and can be backported to rails 4 , cc @tenderlove