Skip to content

small performance improvement on product listing#18773

Merged
magento-engcom-team merged 1 commit intomagento:2.3-developfrom
apasare:performance-improvement
Nov 22, 2018
Merged

small performance improvement on product listing#18773
magento-engcom-team merged 1 commit intomagento:2.3-developfrom
apasare:performance-improvement

Conversation

@apasare
Copy link
Copy Markdown
Contributor

@apasare apasare commented Oct 23, 2018

Description (*)

Get rid of unnecessary reviews queries on product listing:
"select review_entity_summary.* from review_entity_summary where (review_entity_summary.entity_pk_value = ?) and (store_id = ?)"
This query was executed for each product on listing which didn't have a review summary(@see: Magento\Review\Model\Review::appendSummary and Magento\Review\Block\Product\ReviewRenderer::getReviewsSummaryHtml)

Manual testing scenarios (*)

  1. Use a profiler(e.g. blackfire)
  2. Go to any product listing page(category page)
  3. After profiling the product listing page you should notice that for each product which doesn't have a review an additional sql query is executed: "select review_entity_summary.* from review_entity_summary where (review_entity_summary.entity_pk_value = ?) and (store_id = ?)"

E.g.: if on your product listing page you are listing 20 products, and 3 products have reviews, you will see 17 x "select review_entity_summary.* from review_entity_summary where (review_entity_summary.entity_pk_value = ?) and (store_id = ?)"

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Get rid of unnecessary reviews queries on product listing:
"select review_entity_summary.* from review_entity_summary where (review_entity_summary.entity_pk_value = ?) and (store_id = ?)" 
This query was executed for each product on listing which didn't have a review summary(@see: Magento\Review\Block\Product\ReviewRenderer::getReviewsSummaryHtml)
@magento-cicd2
Copy link
Copy Markdown
Contributor

magento-cicd2 commented Oct 23, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @godvsdeity. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@miguelbalparda miguelbalparda self-assigned this Oct 25, 2018
@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Nov 12, 2018
@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @miguelbalparda, thank you for the review.
ENGCOM-3437 has been created to process this Pull Request

@magento-engcom-team
Copy link
Copy Markdown
Contributor

@godvsdeity thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team magento-engcom-team merged commit 53b5b49 into magento:2.3-develop Nov 22, 2018
@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @godvsdeity. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants