-
Improvement
-
Resolution: Won't Fix
-
Critical
-
None
-
2.2.5, 2.3, 2.4
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
-
20
-
FRONTEND Sprint 7
On Moodles that have a lot of course categories, and a filter enabled for content and headings (e.g. multilang), there are currently excessively many database queries being made (e.g. 1 per course category). For example, if you have 500 course categories, which is often the case for large institutions, you will have > 500 queries on course/index.php or course/category.php.
The database queries are caused by a call to get the context instance for each course category.
I've coded something in the branch https://github.com/brki/moodle/tree/mdl23-preload-filters-for-course-categories . The commit https://github.com/brki/moodle/commit/da23cce06d7edbd2cad43ba9c25396dcf5bfac35 preloads all the course category context instances for course/index.php and course/category.php. This reduces the database queries significantly (it makes two database queries to get all of the course category contexts instead of one for every course category).
- has been marked as being related by
-
MDL-37316 filtering related improvements 2.5 META
- Closed
-
MDL-37276 replace $FILTERLIB_PRIVATE with MUC cache
- Closed
- is blocked by
-
MDL-29996 Drop support for legacy filters and locations
- Closed
- will help resolve
-
MDL-34320 Improve performance when showing category list by not filtering category names
- Closed