-
Improvement
-
Resolution: Fixed
-
Minor
-
3.5.3
-
MOODLE_35_STABLE
-
MOODLE_37_STABLE
-
MDL-64284-36_get_component_classes_cache -
The admin page has become noticeably slower on big sites which have many plugins installed, especially plugins that have large numbers of autoloaded classes (eg the local_aws which pulls in a ton of libraries)
Some profiling points towards the core_component::get_component_classes_in_namespace being either slow or just called too much (eg on my dev box it is called 505 times, and takes 1.5 seconds wall clock time).
But I think the root cause is actually the core_analytics\manager::get_analytics_classes which hammers this repeatedly with very similar calls searching for similar classes eg 'time_splitting'. Each time it is searching the entire list of classes. If I temp comment out the analytics code then the admin search is 1.5 seconds or 3x times faster.
I'm thinking a way to speed is up is here:
https://github.com/moodle/moodle/blob/master/analytics/classes/manager.php#L613
Search for just all 'analytics' classes, statically caching that much smaller list, and then search that for the $element class.
- has been marked as being related by
-
MDLSITE-5717 Extend performance comparison tool coverage over admin pages
- Open