[Koha-bugs] [Bug 34121] Improve performance of Koha::Plugins::call

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 27 09:11:00 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34121

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julian.maurice at biblibre.com

--- Comment #3 from Julian Maurice <julian.maurice at biblibre.com> ---
Hi Kyle,

As it is in master, Koha::Plugins::call runs one SQL query on the first
invocation, and zero on the next invocations (thanks to
Koha::Cache::Memory::Lite).
With your patches, it will run 2 SQL queries on every invocations. Is it really
faster ?

(In reply to Kyle M Hall from comment #0)
> In addition, get_enabled_plugins uses can_load to evaluate plugis, but call
> already uses eval to call methods making the use of can_load and
> $plugin_class->new() superfluous and wasteful.

That's two different things. `get_enabled_plugins` instantiates each plugin
object, while `call` uses these plugin object to invoke the plugin method.
You can't invoke the plugin method without instantiating the plugin object
first

I can see that the patches are not finished yet, but wanted to give you an
early feedback anyway. I hope that helps

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list