Developer forum

Forum » Ecommerce - Standard features » Add to cart performance decrease

Add to cart performance decrease

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have a mixt solution, B2C/B2B running on 8.8.1.32

FOr B2B clients, we have noticed a significant decrease in performance as the number or orderlines increases.

We are using AJAX call for add to cart, and the page where we add to is displaying a JASON with the content of the cart. Just to be sure, I also tried rendering an empty layout but there was no change in performance.

I have used debug=true to identify the calls that are taken unreasonable amount of time.

I have identified one in particular:


USE [df_austral_dw]
DELETE FROM EcomOrderContextAccessUserRelation WHERE OrderContextAccessUserAccessUserID = 9698 AND OrderContextAccessUserOrderContextID = 'ORDERCONTEXT2';INSERT INTO EcomOrderContextAccessUserRelation (OrderContextAccessUserAccessUserID, OrderContextAccessUserOrderContextID, OrderContextAccessUserOrderID) VALUES (9698, 'ORDERCONTEXT2', 'CART28186') took 4424 ms

Why is this needed and how can I avoid it/optimise it?

Thanks,

Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have investigated more and it looks that the cart page is not the issue but the actual add to cart.

Can the performance be affected by the number of discounts defined in the system?

If so, how can I avoid recalculating the cart everytime I add something to cart?

Thanks,

Adrian

 
Nicolai Pedersen
Reply

Hi Adrian

Yes, it can be affected. You can add &redirect=false&debug=true and see what happens.

Performance will be affected by the number of discounts - so how many is many?

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

They have about 130 Order discounts. Each discount is a combination of percentage, voucher code and User group.

I tried to group them by discount percentage into less discounts but it was pretty complicated to manage and setup.

If this affects the performance, I will have to do something about the discounts. There is no way to add to cart without recalculating the cart?

Thanks,

Adrian 

 
Nicolai Pedersen
Reply

Sounds like an "expensive" discount setup - but test how it behaves.

You cannot disable price calculation on orders...

NP

 

You must be logged in to post in the forum