Closed t-heuser closed 2 years ago
Hi @oneserv-heuser. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
What I did as quick workaround: Created an around plugin that gets the data from the index if present and otherwise executes the slow function. Here is a patch file which includes the fix as a module: fix(graphql)__products_query_is_slow_with_configurable_products.txt
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://93d31a397d34ec8ad3754240d4e7c422.instances.magento-community.engineering Admin access: https://93d31a397d34ec8ad3754240d4e7c422.instances.magento-community.engineering/admin_f8aa Login: e734f3f7 Password: cd76e8920159
Hi @oneserv-heuser,
Thank you for reporting and collaboration.
Verified the issue on Magento 2.4-develop branch and 2.4.5 but the issue is not reproducible.We are able to retrieve the price of configurable products within less than a minute.
1.Created 36 configurable products with 200+ variants.
Please let us know we miss anything.
Thanks.
@magento give me 2.4-develop instance
Hi @oneserv-heuser. Thank you for your request. I'm working on Magento instance for you.
Hi @oneserv-heuser, here is your Magento Instance: https://93d31a397d34ec8ad3754240d4e7c422.instances.magento-community.engineering Admin access: https://93d31a397d34ec8ad3754240d4e7c422.instances.magento-community.engineering/admin_e0b4 Login: 256208d4 Password: 9f9b143bed01
@engcom-Bravo Sorry, it looks like I need to specify my numbers a little bit more. Please try the same with bigger configs. For example our biggest configurable product has around 1.200 single products. So I guess our biggest category has around 15.000 single products behind it's configurable products in the first 36 products.
Could you please try to reproduct the issue with even bigger configs, thank you.
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://93d31a397d34ec8ad3754240d4e7c422.instances.magento-community.engineering Admin access: https://93d31a397d34ec8ad3754240d4e7c422.instances.magento-community.engineering/admin_0e39 Login: e9a09e29 Password: 688b5e3875e2
Hi @oneserv-heuser,
Thanks for quick update.
Verified the issue on Magento 2.4-develop branch and 2.4.5 and the issue is not reproducible.We are able to retrieve the price of configurable products within less than a minute.
Created a 36 Configurable Product with 10,000+ Variants and assigned it to category.
Please let us know we miss anything.
Thanks.
Hi @oneserv-heuser,
We have noticed that this issue has not been updated for a period of 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.
Thanks.
Preconditions and environment
Steps to reproduce
Execute the following query:
Here I'm trying to reveice 36 products of a category. 36 is a standard magento listing size for categories. This query is very slow and takes more than a minute if all/a lot of the products inside the category are rather huge configurable products (more than 200 variants).
Expected result
The query is not taking more than a minute to resolve.
Actual result
The query is taking more than a minute to resolve.
Additional information
The problem only occurs if you try to get anything inside
price_range
. If you don't request this field the query is fast again. The problem can be found here: https://github.com/magento/magento2/blob/91549b925da128ba79807400f551f2b2d0cfeed9/app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/Product/Price/Provider.php#L100-L113Magento iterates through all child products and tries to get the minimum price. This is very slow if done for a lot of configurable products with several child products (same problem applies to getMaximalPrice() .
It would be smart here to use the price from the price index as in the table
catalog_product_index_price
all the data needed is already stored. Magento does this for it's traditional storefront and uses the indexed data there, in GraphQl unfortunately not which leads to the slowness of requests.Release note
No response
Triage and priority