-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance of isSalable method check on configurable product #26065
Comments
Hi @ilnytskyi. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @ilnytskyi do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @ilnytskyi. Thank you for your report. The fix will be available with the upcoming 2.4.0 release. |
Magneto 2.3.x
Preconditions (*)
Proposal to optimize or replace
getUsedProductCollection
in call\Magento\ConfigurableProduct\Model\Product\Type\Configurable::isSalable
since it can affect performancee.g. create alias for
getUsedProductCollection
->getLinkedProductCollection
and use this method inisSalable
additionally store its result to prevent multiple DB calls.Steps to reproduce (*)
Expected result (*)
\Magento\Swatches\Model\Plugin\Configurable::afterGetUsedProductCollection
is not called afterisSaleable
call\Magento\ConfigurableProduct\Model\Product\Type\Configurable::isSalable
stores result since it can be called twiceActual result (*)
\Magento\Swatches\Model\Plugin\Configurable::afterGetUsedProductCollection
is called when isSaleable checks\Magento\ConfigurableProduct\Model\Product\Type\Configurable::isSalable
affects performance since the result is not cached andafterGetUsedProductCollection
calledThe text was updated successfully, but these errors were encountered: