[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
Fri Mar 29 10:46:00 CET 2024


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #164083|0                           |1
        is obsolete|                            |

--- Comment #3 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 164121
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164121&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!

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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


More information about the Koha-bugs mailing list