[Koha-bugs] [Bug 29672] Increase performance of Koha::Plugins->call
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jun 3 01:53:38 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29672
--- Comment #16 from David Cook <dcook at prosentient.com.au> ---
I like the concept.
A few questions:
1) Why does get_enabled_plugins return the array rather than an array
reference? (I suppose it might not matter much since the array will just be a
list of references itself, but it just seems less efficient.)
2) Each Koha::Plugins->call() loops through the plugin list checking the
methods available. If there is a large plugin list, this will scale linearly
and be progressively slower.
Since we're already looping through the plugins in get_enabled_plugins, it
could be a good idea to do that method check at the same time and build a hash
map of methods to plugins. (The downside is that you'd have to pre-check all
methods rather than lazily check just the methods you're demanding at method
call time, but that expense would be 1 time rather than N times.)
I think that would maek sense since what we're really trying to do here is
"get_enabled_plugins_with_method", right?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list