Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Site Slow When We Have Lots Of Promotions Rate Topic   - - - - -

 

Posted 28 March 2014 - 03:20 PM #1

We have only a handful of products in our system, but we require thousands of promotion codes. The more codes we have the slower the system gets.

For example, we currently have just over 3,000 codes and adding a code, removing a code, checking out, etc, each takes no less than 10 - 15 seconds to complete. If I remove promotions down to a handful, the performance returns to where I would expect.

I tried adding some indexes to the cscart_promotions and cscart_promotion_descriptions tables but it did not improve the performance.

Other Users:
* Does anyone else have our quantity of promotions?
* Are you performing well or poorly?

csCart:
* Do you know why this might be happening?
* Is there a known limit to the number of promotions the system can handle well?

We are currenlty operating on version 4.1.2.

 
  • extrarius
  • Member
  • Members
  • Join Date: 05-Feb 14
  • 29 posts

Posted 18 August 2014 - 07:44 PM #2

We actually found this issue and it has nothing to do with the SQL tables. It has to do with the way the fn_promotion_apply() function works. It pulls out ALL active promotions regardless if the page in question has any suitable products or not, then loops through every one of them. This is what causes the slow down. We're actually re-writing this function via hooks to eliminate that problem.

HardwareAndTools.com

The Internet's Largest Hardware Store


 

Posted 22 August 2014 - 01:03 AM #3

We're actually re-writing this function via hooks to eliminate that problem.


Thank you for your feedback. I would be greatly interested in any insight you might have after you have completed your override code, if you are willing to share.

 
  • extrarius
  • Member
  • Members
  • Join Date: 05-Feb 14
  • 29 posts

Posted 02 September 2014 - 05:58 PM #4

I sincerely apologize for the late reply, we've been putting out a lot of fires. I filed a bug report with CS-Cart about the issue, hopefully some of our code will help you:

http://forum.cs-cart...-of-promotions/

HardwareAndTools.com

The Internet's Largest Hardware Store