Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.3, 2.4
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_23_STABLE
-
MDL-34783-master-1 -
Description
We've been seeing some massive speed issues on the /my page and they largely seem to be a result of get_fast_modinfo repeatedly resetting.
Having tracked this issue back:
- blocks/course_overview/block_course_overview.php::get_content()
- calls enrol_get_my_courses() to retrieve a list of courses
- passes this list to print_overview($courses, $remote_courses)
- course/lib.php::print_overview()
- loops through each module, and calls its {$mod->name})print_overview() function
- {$mod->name})print_overview() calls get_all_instances_in_courses()
- lib/datalib.php::get_all_instances_in_courses() calls get_fast_modinfo()
- lib/modinfolib.php::get_fast_modinfo()
- checks whether the cache is filled and a relevant entry is found for the specified course
- if found returns
- if not inserts a new course_modinfo object into the cache
- lib/modinfolib.php::course_modinfo
- checks whether the supplied course has a valid modinfo and sectioncache - if not, it calls rebuild_course_cache which resets the get_fast_modinfo cache
Unfortunately though, the course_overview block doesn't retrieve the sectioncache field for each course from the DB, and as a result, every time a course is retrieved, the entire get_fast_modinfo cache is emptied.
Attachments
Issue Links
- blocks
-
MDL-34785 Course overview block courselimit > MAX_MODINFO_CACHE_SIZE and causes frequent partial resets of the get_fast_modinfo cache
-
- Closed
-