-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Remove redundant COUNT() call for 1st page of results #34484
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
Remove redundant COUNT() call for 1st page of results #34484
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 ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, 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, 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 |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
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,
Great improvement! I guess for large data sets it might be really noticeable. Do you have some measurements?
PS: I guess you're talking about the grid of the products that are used in the category, right?
Could you cover this change with a simple unit test?
@ihor-sviziev Of course, Unit Tests are coming in another commit. @OlgaVasyltsun Quick hint for you: When you are creating a new plugin, like
Of course, these are only hints. |
@magento run unit tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
1 similar comment
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests EE, Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests EE, Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
1 similar comment
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento convert to patch for 2.4.3 |
@magento convert to patch for 2.3.7 |
@ihor-sviziev changes has been successfully converted for 2.4.3 version and pushed to the converted-magento-magento2-2.4.3 branch. You may submit a pull request using the link: 2.4.3-release...magento:converted-magento-magento2-2.4.3 |
Hi @lbajsarowicz, |
@sidolov, I believe that we could move it to "Merge in Progress". |
@magento convert to patch for 2.3.7 |
@magento convert to patch for 2.3.7 |
@sidolov an error occurred during the patch generation. |
@magento convert to patch for 2.4.3 |
@ihor-sviziev changes has been successfully converted for 2.4.3 version and pushed to the converted-magento-magento2-34484-2.4.3 branch. You may submit a pull request using the link: 2.4.3-release...magento:converted-magento-magento2-34484-2.4.3 |
Description (*)
Magento is performing lots of redundant DB calls in all the places where pagination is used.
The Category Edit page is one of the examples. If you are on the 1st page, it does not make sense to calculate the last page and redirect to the 1st one... Because you are on the 1st one.
The results of this optimization are worth the change :)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)