Context: Moodle 2.8.8 (i.e., post 2.8.4), MySQL, courses with 300 studentes * 100 gradeitems + complicated categories and aggregations.
Result of making 1 change: DB reads/writes: 70868/43297 DB queries time: 120.40607. Almost 100k queries? What's it doing?! Why 3 queries per grade? If I change a weight (say), surely I don't need to update or select all grades, I only need to touch the aggregations, right?
I thought maybe something was wrong with our database (this site is upgraded continuously since M2.2), so I installed a Moodle 2.9.2, created a course with a 1000 students and 10 gradeitems *with grades* (this is essential, I used the patch from MDL-47911).
Result of making a change: 29306/21018 DB queries time: 41.78441 secs So, again, 3 or 4 queries and updates per grade.
Is there anything I can do? This really makes our instances of Moodle 2.8 very difficult to use. I wonder if nobody else is seeing this: there must be a lot of Moodle admins with 100s of students and 10s of gradeitems. Maybe I'm overlooking something obvious?
I notice MDL-47911 is closed and that development of MDL-48838 and MDL-48839 seem to have stalled. There's also MDL-49324 .