Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.9.4
-
Fix Version/s: STABLE backlog
-
Component/s: Performance
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
I have some sample data & when uploading 165 user records with this sort of thing:
username,course1,course2,course3,course4,course5,group1,group2,group3,group4,group5
myusername,9.1,9.2,9.3,9.4,9.5,9H,9H,9H,9H,9H
myusername2,9.1,9.2,9.3,9.4,9.5,9H,9H,9H,9H,9H
Its costing 16,000 database queries. This makes the upload unusuable.
Need to investigate and improve what is causing this.
Attachments
Issue Links
| This issue has been marked as being related by: | ||||
| MDL-17949 | List of problems related to potential enrolment rewrite in 2.0 - META |
|
|
|
Looks like this is the major culprit:
// make sure user is enrolled into course before adding into groups
if (!has_capability('moodle/course:view', $coursecontext, $user->id, false)) { $upt->track('enrolments', get_string('addedtogroupnotenrolled', '', $gname), 'error'); continue; }
Some sort of course participant cache would help here