-
Bug
-
Resolution: Fixed
-
Major
-
2.6.11, 2.7.8, 2.8.6, 2.9, 3.0, 3.7.1, 3.8, 3.9
-
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-50455-master -
The capability overview improvements implemented by MDL-40368 introduced a recursive function call in the renderer. This recursive call to 'capability_comparison_table()' is called once for each context. Each call in turn calls the tool_capability_calculate_role_data() function using the exact same parameters as the callee. This behaviour results in slow page loading which can potentially lead to timeouts when a large result sets are generated (usually when there are lots of overrides and/or capabilities selected).
One proposed solution to address this involves adding a static variable to capability_comparison_table() which will cache the return data from tool_capability_calculate_role_data() for each different capability / context combination.
I will link a change with this proposed solution in this tracker shortly.