On Apr 29, 2010, at 5:54 PM, Adam Heath wrote:

Well, I don't know about your question, it really should be a separate
thread(or change the subject).

What we are seeing, is that getSurvey is being called on the product,
2000+ times.  It's also hitting the database quite a bit, because of
one missing findByAndCache call on ProductCategoryMember(I'll send a
patch for this one eventually).

There's no reason to call getSurvey over and over with the same
parameters.  However, there's also no way for it to cache that call.
The real fix here is to allow each promo action to 'swallow' as much
quantity as is allowed, instead of the higher code looping once for
each whole number of quantity.


Yes, I think it should do exactly what you are saying -- all I was saying was that you are in the code right now and it would be interesting (on a related matter) to know how it would handle quantity fractions. If you are going to rework it one of the requirements should be that it handles these properly. Being un-familiar with promotions I can only speculate that I should be able to create a promotion where if I buy a 1/2 oz of a product I should be able to get a 1/4 oz free. And based on the original post I don't think that would work either.

Reply via email to