November Happy Hour will be moved to Thursday December 5th.

[EPi v.11.2] Saving 5000 LineItems on Order takes 5min

Vote:
 

Hi

i have a challenging business requirement.
A company can order 5000 uniqe lineitems at once.

While doing the orderrepo.Save it takes about 5min for EPiServer to save the 5000 post.

I think that this is alot of time for 5000 post but i am a rookie at CM.

Any suggestions how to speed it up or why this takes 5min to save?
Any counter questions that can jumpstart my brain?

EPi v.11.2

#186935
Edited, Jan 09, 2018 9:20
Vote:
 

Are you saving a cart, or an order?

For saving 5000 line items, there will be 5000 round trips to database, so it's indeed slow. The system is smart enough to see if a lineitem is changed or not before saving, to reduce time, but if it's 5000 new lineitems, it can't help.

If you are saving a cart - then consider the new serializable cart system, which allows to save everything at once. https://world.episerver.com/documentation/developer-guides/commerce/orders/serializable-carts/

When you already convert to an order, I suppose you will only change a few of them at a time, and the saving time would be acceptable. 

#186940
Jan 09, 2018 10:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.