Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Serious performance penalty with assortments

Serious performance penalty with assortments

Anders Ebdrup
Anders Ebdrup
Reply

Hi Dynamicweb,

 

After upgrading a solution from 8.9 to 9.4 we experience serious performance issues in the cart!

The server side loading time goes from 600ms to at least 10.000ms and up to 37.000ms if we have the cart module setting "remove unavailable products" activated. If I then deactivate "assortments" the loading times goes down to appr. 1.000ms which is acceptable.

The solution has appr. 1.2 mio items in EcomAssortmentItems-table, and I can see that the logic in HasAccessToProduct as been changed to rely only on linq-expressions which have a terrible performance on large datasets. I the believe the issue is caused by changing this from:

            Dim productAssortmentIds As IEnumerable(Of String) = AssortmentItem.GetAssortmentsByProduct(product).

                Where(Function(a) (Not IsNothing(a) AndAlso a.Active AndAlso a.LanguageID = Context.LanguageID)).Select(Function(a) a.ID)

To:

            Dim productAssortmentIds As IEnumerable(Of String) = AssortmentItem.GetAssortmentItemsByLanguageID(
                Common.Context.LanguageID).
                    Where(
                        Function(ai) _
                             (ai.ProductID = product.Id AndAlso ai.ProductVariantID = product.VariantId AndAlso
                              ai.LanguageID = product.LanguageId AndAlso Not IsNothing(ai.Assortment) AndAlso
                              ai.Assortment.Active)).Select(Function(ai) ai.AssortmentID).ToList()

 

Can you please change this back or put it into e.g. a dictionary which is much better for large lookups.

Please provide a quick fix for this as we are going live with the upgraded solution next week.

 

Best regards, Anders

 


Replies

 
Nicolai Pedersen
Reply

Hi Anders

We are on it!

Will get back.

BR Nicolai

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Nicolai,

 

Sounds great! Can we have a hotfix for the issue in this week?

 

Best regards, Anders

 
Martin Vang
Martin Vang
Reply

Hi Anders,

Can you try it with Dynamicweb.Ecommerce 1.4.29? Should fix your problems, without actually having to wait for a hotfix.

BR

Martin

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi Anders

The problem TFS#49070 problems with assortments performance has been released in version 9.4.10 (Dynamicweb.Ecommerce 1.4.29 included)

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

http://doc.dynamicweb.com/releases-and-downloads/releases

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

Kind Regards
Dynamicweb Support
Kristian Kirkholt

Votes for this answer: 1

 

You must be logged in to post in the forum