-
Notifications
You must be signed in to change notification settings - Fork 9.4k
GroupedProductGQL - When loading the child products the load is one-by-one (N+1 vs 1 load - Performance) #39798
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
Comments
Hi @steven-hoffman-jomashop. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Thanks for your reporting and collaboration. We have tried to reproduce the issue in latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots. We have followed this document https://developer.adobe.com/commerce/webapi/graphql/schema/products/interfaces/types/grouped/ for retrieving grouped product information we got response with 1 query for A grouped product exists with childCount >= 5
Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible. Thanks. |
Preconditions and environment
{ items { id sku ... on GroupedProduct { items { product { id sku } } } } }
Steps to reproduce
Expected result
Actual result
Additional information
Issue appears to have been introduced here: ACPT-1181: reset mutable state after request - app/code/Magento/CatalogGraphQl/Model/Resolver/Product.php
You can observe the change from using the 'singleton' version to using the newly created version
Changing from the singleton version causes each call to this resolver to load only that one child
(Also note, cursory review shows other uses of ProductDataProvider without using the Factory)
Going back to a singleton would resolve the performance issue
Converting to a 'BatchResolver' would allow the use of the factory and would enable mitigation of the performance issue
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: