Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80763

Improve H5P Content Bank Index Performance

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.1.8
    • H5P
    • None
    • MOODLE_401_STABLE

      Loading the index page of a content bank with H5P content located in an external object storage (i.e. S3) sees load times as high as 2 minutes.  This is primarily due the way content is retrieved and permissions are checked.  

      For each item in a content bank, the access permissions are verified using this is_view_allowed() function when the content type is H5P. This function creates an instance of H5P player -  introducing a bottleneck when extracting files from the package. Instead of extracting all the files at once, a stream handle for each file is created and saved from to a new file using getStream() and saveFileFromZip respectively.

      As these files are stored remotely, network requests are sent to retrieve these streams, causing severe performance issues.

      Outcomes:

      1. a more efficient way to verify H5P permissions
        • currently all content items are downloaded when visiting the content bank index page
      2. a more efficient way of extracting files within the zip

            Unassigned Unassigned
            djarran Djarran Cotleanu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.