Nosto/nosto-magento

Updating the inventory may lead to checkout performances issues

eperrotta opened this issue · 1 comments

Calling $productService->updateBatch($products) from public function syncInventoryLevel(Nosto_Tagging_Model_Meta_Order $order) causes Magento to reload the product the inventory decreased for.
If an order contains 5 products, and these products are associated to 5 store views, the extension force Magento to reload ( $nostoProduct->reloadData($mageProduct, $store) ) 25 products + 5 api calls (Nosto_Operation_UpsertProduct::upsert), with performance issues: just to update the inventory.

Thanks for reporting this @eperrotta. We will investigate if there's a way to speed up the inventory level update. This will most likely require some changes to both, the extension and in Nosto's backend as well so I cannot promise a quick resolution. Updating the inventory level can be switched off (https://github.com/Nosto/nosto-magento/wiki/Supplier-Cost-&-Inventory-Level#enabling--disabling-inventory-level-metadata) in case it causes too much performance issues