Developer forum

Forum » Integration » Carts with many order lines takes a long time to calculate order with live integration

Carts with many order lines takes a long time to calculate order with live integration

Roald Haahr
Reply

Hi,

On a Swift we are experiencing that adding many order lines to a cart will cause the solution to load for a long time. E.g. a cart with 24 order lines (27 products in total as two orderlines have quantity 2 and 3) will take around 10 seconds for each additional product added. Running debug=true reveals that the following requests are made to the ERP system:

CalculateOrder

Called once, takes 303 ms

DynamicwebLiveIntegration.ProductPriceProvider.FindPriceInfoWithContext

Called 648 times, takes 1 to 11 ms per request/response pair. Turns out that 648 = 24 x 27 ({PRODUCTS} x {ORDERLINES})

GetProductsInfo

Called once, takes 56 ms

So it seems that the live integration is requesting the prices way too many times, which makes it slow.

The solution is running DW v9.15.7 and the Dynamicweb.Ecommerce.DynamicwebLiveIntegration dll has been upgraded from v.7.2.7 to v7.2.12 to see if that would fix the problem, but unfortunately that was not the case.

Can I somehow tweak the settings to make this faster?

Kind regards,
Roald


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Roald

Yes - we will investigate if something needs handling here.

Can you show us a screendump of your live integration setup? Do you cache the requests and do you run in a mode where all communication is logged and written to disk?

 
Roald Haahr
Reply

Hi Nicolai,

It is setup as shown below. As we are still testing, all requests and responses are logged. I did a test with 'Log request and response content' disabled, but it still takes a long time. As for the caching I have tried to set the caching levels to both Page and Session on both prices and orders, but it makes no difference.

Kind regards,
Roald

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Roald

Thanks. Currently you have full logging enabled and are only using page based caching. This will impact performance.

What happens if you add session based caching and disable logging? Full logging is not meant for production - that should only be error logging.

 
Roald Haahr
Reply

Hi Nicolai,

I disabled logging and set the cache to be session based. I then put together a new cart and tested the performance. At 33 products in the cart, I added an extra product, which took 13.57s, so it still takes too long with these settings.

I don't have any other recent solutions that are using live prices, so I have nothing recent to compare it to. Do you have somewhere to test this?

Kind regards,
Roald

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Roald,
do you have a solution url so we can investigate more about the problem?
If yes then you can shere it here or send it to: dbe@dynamicweb-cms.com
Have you made some changes in the Swift templates or is it a standard? Do you have any custom subscribers or custom code implemented and used?
BR, Dmitrij

 

You must be logged in to post in the forum