[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 02:03:13 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29672
--- Comment #17 from David Cook <dcook at prosentient.com.au> ---
(In reply to David Cook from comment #16)
> I think that would maek sense since what we're really trying to do here is
> "get_enabled_plugins_with_method", right?
Actually, why not create "get_enabled_plugins_with_method"?
We store the methods in a table too, so you could fetch all enabled plugins for
method X, and then cache those plugins.
That way, you're just caching a list of plugins for methods that are used. That
means every call of "$_->can($method)" *should* be true, so there should be no
wasted loops.
That said, you could wind up with multiple plugin objects in different cached
hash maps. I suppose you could work around that by having 2 cached hash maps.
But I suppose that's growing in complexity.
Anyway just my two cents.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list