Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12680

Optimize the 'get average product rating' method logic

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • Upcoming Branch
    • Upcoming Branch
    • product
    • None

    Description

      #Problem: When calculating the average product rating for any product, the 'get average product rating' method first retrieves the whole list of reviews and then iterates all product reviews to determine.

      The approach takes time to respond when there are thousands of reviews of a single product. It takes significantly longer to display many products together with their reviews. (e.g. search result page)

      #Solution: We can use the 'average' function to get the average rather than iterating all the product reviews.

      Attachments

        1. tiny-gizmo (1).png
          171 kB
          Priya Sharma

        Issue Links

          Activity

            People

              sourabh.jain sourabh jain
              sourabh.jain sourabh jain
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: