spree/spree — pull request #5565 by mbj (2014-11-04 02:00:06+00:00)
Title: Fix validation to skip performing a query if the field is blank

Reduces the amount of queries when doing order / product / promotion / store / tax category / zone related validations. Without any real semantic difference.

We where able to observe a smaller performance improvement in a custom order related task with this unneded query removed. And fixed all adjacent instances also.

I think this change is an iterative improvement as it at least reduces the amount of noise being generated by SQL queries.