[Koha-bugs] [Bug 36447] Circ rules slow to load when many itemtypes and categories

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 28 16:05:21 CET 2024


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

--- Comment #1 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 164065
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164065&action=edit
Bug 36447: Circ rules slow to load when many itemtypes and categories

It seems that we loop all categories and item types to build the circ
matrix. We should only loop over values that have actually been used
in circulation rules.

Test Plan:
1) Create 1000 itemtypes and category codes. You can use the following script:
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new();
$builder->build( { source => 'Category' } ) for 0..1000;
$builder->build( { source => 'Itemtype' } ) for 0..1000;
2) Note the lengthy load time for smart-rules.pl
3) Apply this patch
4) Restart all the things!
5) Reload the page
6) Note the much faster load time!

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


More information about the Koha-bugs mailing list