Can and must be delivered together with #3243: Product Salability Improvements branch
Summary (*)
Product salability data should not be loaded every time on product load, on-demand only.
See \Magento\CatalogInventory\Observer\AddInventoryDataObserver.
Examples (*)
Current behavior can lead to performance degradation;
It is required change to resolve #3200: Composite products support for IsProductSaleable
Call AreProductsSalable service in a plugin on $product->isAvailable() method in order to preserve current logic. See #3039 Async Salable Status, it is partially implemented there, so some commits should be cherry-picked.
Can and must be delivered together with #3243: Product Salability Improvements branch
Summary (*)
Product salability data should not be loaded every time on product load, on-demand only. See
\Magento\CatalogInventory\Observer\AddInventoryDataObserver.
Examples (*)
Proposed solution
\Magento\CatalogInventory\Observer\AddInventoryDataObserver
\Magento\InventoryBundleProduct\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin
\Magento\InventoryConfigurableProduct\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin
\Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin
AreProductsSalable
service in a plugin on$product->isAvailable()
method in order to preserve current logic. See #3039 Async Salable Status, it is partially implemented there, so some commits should be cherry-picked.