spree/spree — pull request #5833 by imella (2014-12-24 17:46:10+00:00)
Title: Refactor sales_total report, better performance when having many orders

Currently the sales report performs really slow when having a big number of orders (+1000). Basically because it's iterating through each order and adding each value.

This uses the SUM sql operator to boost performance.