-
Bug
-
Resolution: Fixed
-
Critical
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_27_STABLE
-
MDL-42965_master -
-
I've seen that if you have a manually awarded badge on a course with lots of users (think really really big), it takes a VERY long time to run the cron.
Looking into it:
review_all_criteria() gets all enrolled users, and a list of all users who have already earned the badge.
For all those who haven't earned it, it calls $crit->review(), where $crit is an instance of each of the types of criteria.
In the case of award_criteria_manual (and possibly others), review() runs a get_record().
So for a course with 1,000,000 users, that means we perform 1,000,000 get_records. This is obviously slow.
Even for a small course, this will hammer the DB and kill performance.
We should be able to pass a cached recordset into criteria.
- has a non-specific relationship to
-
MDL-25499 Centralise management of all types of cron tasks with registration, scheduling, parallel task conflicts(blocking) and running once off tasks, all using an administration screen.
- Closed
- will help resolve
-
MDLSITE-2625 No more emails from moodle.org community.
- Resolved