Hi there,
The Avalara Tax Provider creates tax orderlines to the order. We started to see some slowness when the tax provider was active.
We narrow down the issue to the FindPrice method, which is filtering the EcomPrices table for the current product. Although in the tax provider orderlines we are not setting a product, it seems that the new OrderLine() method retrieves a new product with AutoId=0.
This causes a EcomPrices table lookup without filtering by any product, since our EcomPrices table has more than 500k records is taking a lot to load the minicart/cart json feed. https://www.screencast.com/t/Yh1kLCKT
Using a custom Avalara Tax Provider we tried to set the orderline product to null, but that wasn't adding the orderline to the order.
This might be happening with any provider that adds non product orderlines to the order.
A suggestion is to filter the products collection on the FindPrice method that have a valid AutoId, and retrieve the proper products collection that can be used in any PriceProvider.
Thanks,
BR, Mario