Closed adarshkhatri closed 1 week ago
Hi @adarshkhatri. Thank you for your report. To speed up processing of this issue, 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@magento I am working on this
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.
Hi @engcom-Hotel. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @adarshkhatri,
Thanks for the report and collaboration!
We have gone through the description and we can understand that you are concerned with the performance of Magento as the GQL Custom field for ProductInterface is treated as an attribute. But can you please let us know your use case in which you feel performance degradation? And the tool you used to calculate the performance.
Thanks
The performance impact would be for bigger databases/stores. When there are 100s of custom fields for the product interface, Magento is treating them as attributes. Running those 100s attribute queries
(unnecessary queries) will impact the DB performance for the high visitor/transaction stores. In days like black Friday, system has to run precisely and should not lock the DB for no reason. With these queries running will definitely have the negative impact.
I don't have the number yet, I am on route to review the MySQL queries at the moment. Have been logging the queries and using NR to review them.
Should we focus on the degradation number (which will be diff for each instance), or should we discuss about the unnecessary DB impacts more?
Hello @adarshkhatri,
Thank you for the detailed explanation.
Given the context of Magento 2, I believe it would be more beneficial to discuss the unnecessary impact on the database rather than focusing on specific degradation numbers, which can vary between instances. Understanding and addressing the root cause of these unnecessary queries will help us improve performance across all stores, especially during high-traffic periods like Black Friday.
Once you have the MySQL query logs and insights from New Relic, we can dive deeper into specific areas of improvement.
Looking forward to your findings and recommendations.
Thanks
Dear @adarshkhatri,
We've observed that there haven't been any updates on this issue for quite some time. Therefore, we assume it's been resolved and will close it. Feel free to open a new ticket or reopen this one if you need more help.
Regards
Summary
Custom field for ProductInterface is treated as attribute by Magento. First it will check if this attribute exists and if it exists then it will try to load the data for a product.
This is unnecessary. This is impacting performance.
PS could be same for Category or any other types, I haven't tested it yet.
Examples
Take an example below:
In this example, Magento will do this query in the background:
As you can see, Magento is treating our custom field
attribute_set_id
as an attribute. It is checking if this attribute exists and if exists then it will try to load the data for a product.Proposed solution
Do not treat them as attribute.
Release note
No response
Triage and priority