MDL-46147 modinfo: performance improvement for course page
This is a big win in a specific situation, ie filters enabled for content+headings, and no activity descriptions visible on the course page.
This commit is contained in:
committed by
Marina Glancy
parent
5c1049f72b
commit
30e2727e72
@@ -1323,6 +1323,10 @@ class cm_info implements IteratorAggregate {
|
||||
if (!isset($options['context'])) {
|
||||
$options['context'] = $this->get_context();
|
||||
}
|
||||
// Improve filter performance by preloading filter setttings for all
|
||||
// activities on the course (this does nothing if called multiple
|
||||
// times).
|
||||
filter_preload_activities($this->get_modinfo());
|
||||
return format_string($this->get_name(), true, $options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user