Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10055

Improve the performance of the project search

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ElasticSearch, Web, Web API
    • Labels:

      Description

      Loading the project search page of a large SonarQube instance can be very slow (during my tests, I saw up to 70s for sonarcloud). It seems like only a first page load after estimated 2 hours of inactivity is slow, subsequent page loads are quite fast.

      The reason is api/measures/search. The method org.sonar.server.measure.ws.SearchAction.ResponseBuilder#searchMeasures uses the selectByComponentsAndMetrics SQL to retrieve the measure values. Probably the two inner joins are too expensive.

      One solution for this issue might be, to avoid calls to api/measures/search for the project page, and instead return all required values as part of the response of api/components/search_projects (private API). We could therefore use the project measures index - avoiding the expensive SQL query. (note that api/components/search_projects even already uses the project measures index for to get the project uuids).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                daniel.schwarz Daniel Schwarz (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: