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?
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.