spree/spree — pull request #4294 by HoyaBoya (2014-02-03 21:17:09+00:00)
Title: In memory sort of variant.options_text

Assume that the option_values -> option_types have been eager loaded via joins/includes and simply sort in memory. Removing the explicit query removes N queries for products/show in the api where N = number of variants that belong to the product. This should allow us to fully take advantage of the API optimizations made here:

https://github.com/spree/spree/commit/30597b2aa7a1f47b5e636750baf7c100f0cc42b2

This is probably making things worse if things aren't eager loaded....if this is dicey, I guess I can just class_eval out options_text within our app but I would love to have an optimal API out of the box.