Skip to content

Bad performance in Magento_Review module #39761

@oskar-olaussen

Description

@oskar-olaussen

Preconditions and environment

  • Magento version 2.4.6-p9
  • Have reviews enabled
  • Have a product with reviews.

Steps to reproduce

1 .Navigate to the product page
2. Open the review tab.

Expected result

There is not a massive amount of database querys.

Actual result

There are at least as many database querys as there are reviews.

This function is called https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Review/Model/ResourceModel/Review/Collection.php#L237 and it querys the database for ratings in side a loop as many times as there are ratings for the product.

This causes a noticable performance impact for our client. They have products with hundreds of reviews.

Additional information

Maybe load all of the ratings from the database at once?

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.6-p9Indicates original Magento version for the Issue report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions