Slow performance when adding to cart #585
Replies: 1 comment 10 replies
-
It's really hard to say without knowing the custom code that is involved. One thing I could say off the bat is that if you implement a custom ProductAdapter or anything that works with external data, it becomes your responsibility to cache this effectively. The ProductAdapter can be called quite a few times for the same item so if you end up fetching it from an external system each time it's requested, that could really slow things down. Cleaning up old carts can also slow things down over time. We have a future task to implement some cart cleanup logic, but until then it would pay to implement a scheduled task to delete old abandoned carts. If it is database related, might also be worth checking SQL Server to see if it suggests adding any more DB indexes. |
Beta Was this translation helpful? Give feedback.
-
Hi
We seem to have issues when customers add items to the cart when the site is under load, lets say, 300-400 concurrent users. I mean a few seconds (+5) to add items to the cart. Granted its not a simple action as the prices are external so is the product info and we store additional properties for the order and for each line. On my dev machine with prices and product info cached, adding a single item still takes 500-600ms. Is that an expected range for adding items to the cart? We do get high cpu usage during peak times so that may be contributing but I'm trying to narrow down where the bottleneck may be.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions