mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-39445 get_plugin_list clean_param use is slow
get_plugin_list was calling clean_param($pluginname, PARAM_PLUGIN) a lot (600+ times per page), and that is much slower than you would guess. A specific function for this case, (which we then also use from clean_param) is a performance win.
This commit is contained in:
parent
95190fda69
commit
5f85073525
3 changed files with 28 additions and 9 deletions
3
cache/classes/helper.php
vendored
3
cache/classes/helper.php
vendored
|
@ -192,8 +192,7 @@ class cache_helper {
|
|||
if (in_array($pluginname, $ignored)) {
|
||||
continue;
|
||||
}
|
||||
$pluginname = clean_param($pluginname, PARAM_PLUGIN);
|
||||
if (empty($pluginname)) {
|
||||
if (!is_valid_plugin_name($pluginname)) {
|
||||
// Better ignore plugins with problematic names here.
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue