spree/spree — pull request #4821 by brchristian (2014-06-14 20:38:46+00:00)
Title: Improving performance of migration add_line_item_id_to_spree_inventory_u...

...nits

I noticed when I ran these commands on the console that the line

shipments = Spree::Shipment.includes(:inventory_units, :order)

would load a tremendous amount of stuff from the database, negating the performance savings by the `find_each` method. This may even be a Rails bug. Putting the `includes` and the `find_each` into the same line fixed performance issues immediately.