Developer forum

Forum » Development » Live Integration - Improve Performance

Live Integration - Improve Performance

Gonçalo Assunção
Reply

Hello all,

I'm using the Live Integration project in a website, to export orders when finished, synch user information, get user specific prices... Some features were custom developed by me.

What happens is that in my local solution, when I finish a checkout process and send the request to the ERP, I can see in the log file that this process takes about 5 seconds to start synch the order, from the time that I press the 'finish' the order button. In the dev website, this process takes about 20 to 30 seconds to start. Once it starts, it takes less than a second the finish the process.

I've subscribed to the order saved event, and placed a line in the log file everytime it saves the order in the process, so that I can debug this situation better. I can see that in some situation, from the 'last' saved line in the log to the 'start' synch order, it takes around 20/25 seconds.

I can't figure out why.

The site is in testing phase, and when a few users are navigating through the site, DW makes a lot of calls to the ERP to know the price of the products to that user. This makes the site to be slow at times, due to all the requests.

How can this be improved, so that navigating in the site can be smoother?

 

Thank you.


Replies

 
Morten Snedker
Reply
This post has been marked as an answer

Hi Gonçalo,

First of all: when in live environment, the logging ought to be disabled. It is intended for debugging purposes only. As this is intended for debug only, you should try to disable logging all together and recheck performance followingly. If it still takes too long, reenable log and check the timespan between request and response.

That beside, live integration has an optional setting that will reduce the max size of the file log. If this is not set, an append is applied to the log file - this may just take a long time on a relatively large file. The functionality of reducing log size was introduced in late summer, so if you do not have this option, you're using a previous version. The newest is available from the download section.

Obviously, the physical speed of the disk is of importance when writing to disk.

Let me know if the above answers your questions sufficiently.

 

Best regards
Morten Snedker

Votes for this answer: 1
 
Gonçalo Assunção
Reply
This post has been marked as an answer

Hi Morten,

Thank you for your reply. We disabled the logs and there was an improvement to the performance of the checkout process.

Despite this, the process was still too slow. I removed the order saved subscription from the project, and the improvement was significant.
In this event I was only checking if the order was complete. If not, 'return'. With this, the site would crash if there was 5 or 6 requests at the same time to the checkout process.

After this change, each checkout process takes less than 5 seconds.

 

Thank you.
Kind Regards
Gonçalo
 

Votes for this answer: 1
 
Morten Snedker
Reply

Thank you for your feedback, Gonçalo.

I have passed on your findings and they will be considered.

 

Best regards
Morten Snedker

 
Nicolai Høeg Pedersen
Reply

I would like a copy of the code if possible. Would be great to see what could cause the issue.

NP

 
Gonçalo Assunção
Reply

Hi Nicolai,

I've attached the code from that notifier.

The issue was that in the log files there as a 20 second gap between the last 'order saved . finished' and the actual communication bewteen DW - AX. I believe that nothing in that piece of code would affect the performance that bad. The linq call, and the 'editOrder' method, only happens after the order process is complete.

Is the verification of 'order.complete' a heavy process?

edit: The client, who manages the AX side of the process, also found a query that takes about 7 seconds to be completed. I believe that it belongs to the DW standard behaviour in the checkout process. The issue here is that the result of that query, in this case, would retrieve about 90k results. I'm attaching the client thoughts on this.

 

Thank you.

Client.JPG Live_Integration_Order_Saved_Notifier.JPG
 
Gonçalo Assunção
Reply

Hello all,

Happy new year, first of all!

Is there any update regarding this? I've disabled this notifier and this functionality, but the client is insisting in activating this feature.

 

Thank you in advance

Gonçalo Assunção

 

 
Nicolai Høeg Pedersen
Reply

Hi Gonçalo

order.complete is just a simple property and does not take much time. The OrderHandler.editOrder call is probably the issue. It could be related to the SQL you found - I've created an investigation/bug on that to verify (TFS#20550). If DW quieries all users in the group when saving the order, something is wrong...

BR Nicolai

order.complete#sthash.u0qLDOH1.dpuf
 
Gonçalo Assunção
Reply

Hi Nicolai,

Thank you for you answer. I'll wait for the outcome of that ticket then.

Thank you

 

Kind Regards,
Gonçalo Assunção
 

 
Kristian Kirkholt
Reply

Hi Gonçalo

The problem with TFS#20550 with users from Database

Has now been resolved in Dynamicweb version 8.8.0.0

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Gonçalo Assunção
Reply

Hi Kristian,

Thank you for the information. I'll test that as soon as I can!

 

Kind Regards
Gonçalo Assunção
 

 

You must be logged in to post in the forum