-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.5, 4.4, 4.4.1
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.