When having a shop with large quantity items, using promotions becomes impossible due to the way that promotions are calculated. For example when having a global 5% cart discount, for every qty, a seperate line item is loaded into memory. This is called 6 times which makes it not only memory-hungry, but also slow when having a lot of qty's.
This makes the cart crash as soon as you have more than a few hundred items in your cart.
The screenshot attached is a Blackfire screenshot from a cart with 1 lineitem and 1 promotion (active on the whole cart, so no line item splitting needed I would think?) with a qty of 1000.
Environment: PRD
Steps to reproduce:
Create promotion Put max cart limit high Change quantity to large number Expected result:
Quantity change works and cart is loaded correctly Actual result:
Quantity does not get changed because the site goes out of memory. Site returns a 500 error.


