-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Checkout / Sales Rules / Get rid of redundant DB query #29376
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
Checkout / Sales Rules / Get rid of redundant DB query #29376
Conversation
Hi @lbajsarowicz. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
@slavvka @lenaorobei is there an ability to run performance against 2.4-develop and for this PR? Would be good to check the diff. I think this is the only one way to measure this improvement with automated tests |
Nice performance optimization @lbajsarowicz, would be great also to remove the singular query with preloaded category ids into this service by using afterload even on product collection in the shopping cart. |
@magento run Static Tests, Unit Tests These failed due to implementation testing. SVC has to be approved by Magento crew. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lbajsarowicz,
Could you implement following suggestion? #29376 (comment)
@ihor-sviziev That is the subject for another PR. (This will require a set of additional Integration tests) |
@lbajsarowicz I don't mind to improve solution with small steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Approved.
Failing SVC test looks false positive
Hi @ihor-sviziev, thank you for the review. |
@magento run all tests I just rolled back PHPDoc clarification, to avoid Magento approval procedures hell. |
@magento run all tests |
Hi @ihor-sviziev, thank you for the review. |
@magento create issue |
Hi @lbajsarowicz, thank you for your contribution! |
Description (*)
By replacing direct SQL query with Data Provider that was already used in this Validator class allowed me to drastically reduce the cost of checkout placing process.
Local environment
20 products in cart
Custom project
22 products in cart
Related Pull Requests
Fixed Issues (if relevant)
Performance of Checkout
Manual testing scenarios (*)
Enjoy the pleasure of the checkout faster by 20 - 30% (and/or) send me a good whiskey
Questions or comments
Contribution checklist (*)
Resolved issues: