[Koha-bugs] [Bug 28172] Optimize Koha::Plugins::GetPlugins
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Nov 2 09:50:09 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28172
Julian Maurice <julian.maurice at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #119871|0 |1
is obsolete| |
--- Comment #7 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 142918
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142918&action=edit
Bug 28172: Optimize Koha::Plugins::GetPlugins
Instead of doing one SQL query for retrieving a list of plugin classes
(filtered or not by a method name) + one SQL query for each loaded
plugin (to look up the 'enabled' status), we can do a single SQL query,
fetching only enabled plugins, and do the method check using `can`.
It allows to use the Module::Load::Conditional cache when requesting
only enabled modules, which gives a great performance boost
Also, call get_metadata only if needed
Test plan:
1. Make sure you have some plugins enabled
2. Apply the 1st patch ("Test script for GetPlugins")
3. Run the test script several times, copy each result into a file A
4. Apply the other patch(es)
5. Run the test script several times, copy each result into another
file B
6. Compare the results. Times in file B should be smaller than in file A
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list