Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-1762

Catalog page fetches all the API and Component entities from DB unpaged which has a negative impact on UI performance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.5.0, 1.5.1, 1.6.0
    • Performance
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • RHDH F&UI plugins 3258, RHDH F&UI plugins 3259, RHDH F&UI plugins 3267, RHDH F&UI plugins 3268, RHDH F&UI plugins 3269, RHDH F&UI plugins 3270, RHDH F&UI plugins 3272, RHDH F&UI plugins 3273, RHDH F&UI plugins 3276, RHDH F&UI plugins 3277, RHDH F&UI plugins 3281
    • Customer Facing

      Currently (RHDH version: quay.io/rhdh/rhdh-hub-rhel9:1.1-59), the Catalog page loads the entire set of API or Component entities from DB via the api/catalog/entities endpoint when rendering the page:

      Entity API request
      API api/catalog/entities?filter=kind=api
      Component api/catalog/entities?filter=kind=component

      With 10,000 API entities and 5,000 Component entities in DB the following table shows how long on average takes the Catalog page to load/render:

      Entity Filter Avgerage Page Load Time Entities Response JSON Size
      API (10,000) 7.4 s ~101 MiB
      Component (5,000) 3.6 s ~6 MiB

      With 20,000 API entities and 10,000 Component entities in DB the following table shows how long on average takes the Catalog page to load/render:

      Entity Filter Average Page Load Time Entities Response JSON Size
      API 10.2 s ~203 MiB
      Component 5.4 s ~12 MiB

      The returned JSON contains all of the entities of a given kind - the number of items of the JSON list matches the number of entities of a given kind stored in DB.

      This shows that the entire data set is loaded to the browser. Paging is only done in the browser once the data is loaded. So, even if only 10s of entities are rendered on the page, the entire data set from the internal DB is loaded via API and so with increasing number of entities in DB the load time would only get longer and longer.

      IMHO, the paging should be implemented at the API level and the UI should only load the entites from the current page.

              rh-ee-mitkumar Mitesh Kumar
              pmacik@redhat.com Pavel Macik
              RHIDP - Frontend Plugins & UI
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: