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

H5P core content bank slow when user has elevated system capabilities

XMLWordPrintable

      Hello,

      We've noticed that if a user is an Admin or has an increased system role then the H5P core content bank loads really slowly.

      This is on production sites which have a lot of users / courses and 10 or so system roles. On our Dev site with only a handful of users / courses and system roles the content bank returns very quickly.

      Has anyone else seen something similar ?

      It seems very similar to this MDL-75539 which was fixed in 3.11 / 4.0

      Our monitoring system points at it being when it call this SQL query (Full stack trace attached)

      Which in our case is called 50 times (full trace is attached)

      SELECT f.id 
      AS id, f.contenthash, f.pathnamehash, f.contextid, f.component,

      f.filearea, f.itemid, f.filepath, f.filename, f.userid, f.filesize,

      f.mimetype, f.status, f.source, f.author, f.license, f.timecreated,

      f.timemodified, f.sortorder, f.referencefileid, r.repositoryid 
      AS repositoryid, r.reference 
      AS REFERENCE, r.lastsync 
      AS referencelastsync 
      FROM mdl_files f 
      LEFT JOIN mdl_files_reference r 
      ON f.referencefileid = r.id 
      WHERE f.pathnamehash = ?

      Steps to reproduce

      • Go to a course as a user with elevated privileges on a large (non test) Moodle
      • Click More and select Content bank
      • Time page load - note loading time of around 1 minute
      • Log in as a standard Editing teacher to the same course
      • Click More and select Content bank
      • Time page load - note normal loading time of a few seconds

      Regards,

      Ray Reid.

        1. content-bank-second-example-of-slowness.png
          content-bank-second-example-of-slowness.png
          1.42 MB
        2. Courses.csv
          18 kB
        3. image-2024-07-25-22-31-55-798.png
          image-2024-07-25-22-31-55-798.png
          116 kB
        4. image-2024-08-01-10-43-33-574.png
          image-2024-08-01-10-43-33-574.png
          25 kB
        5. image-2024-08-02-09-12-12-647.png
          image-2024-08-02-09-12-12-647.png
          6 kB
        6. MDL-82605_403_1.png
          MDL-82605_403_1.png
          90 kB
        7. MDL-82605_403_2.png
          MDL-82605_403_2.png
          89 kB
        8. MDL-82605_404_1.png
          MDL-82605_404_1.png
          90 kB
        9. MDL-82605_404_2.png
          MDL-82605_404_2.png
          88 kB
        10. MDL-82605_main_1.png
          MDL-82605_main_1.png
          91 kB
        11. MDL-82605_main_2.png
          MDL-82605_main_2.png
          89 kB
        12. Moodle-content-bank-atatus.png
          Moodle-content-bank-atatus.png
          568 kB
        13. Moodle-content-bank-atatus-EXPANDED-300724.png
          Moodle-content-bank-atatus-EXPANDED-300724.png
          2.68 MB
        14. Moodle-content-bank-chrome-devtools.png
          Moodle-content-bank-chrome-devtools.png
          83 kB

            pholden Paul Holden
            moodlemunkee Raymond
            Raymond Raymond
            Ilya Tregubov Ilya Tregubov
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 31 minutes
                1h 31m

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