Koha/admin
Kyle M Hall c13b941429 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@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e04ff28b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-04-17 17:22:53 +02:00
..
searchengine/elasticsearch Bug 27153: Adjust mappings to add title without punctuation 2023-10-24 15:44:34 -03:00
additional-fields.pl Bug 35190: Adjust UI handling to avoid inserting an empty string 2023-11-03 14:22:47 -03:00
admin-home.pl Bug 31401: Update administration sidebar to match entries on administration start page 2022-09-07 13:55:32 -07:00
adveditorshortcuts.pl
aqbudgetperiods.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
aqbudgets.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
aqcontract.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
aqplan.pl Bug 28327: Unify CSV delimiter special behavior for tabulation 2022-08-19 15:53:12 -03:00
audio_alerts.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
auth_subfields_structure.pl Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
auth_tag_structure.pl
authorised_values.pl Bug 31976: Incorrect default category selected by authorized values page 2022-10-27 09:46:58 -03:00
authtypes.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
background_jobs.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
biblio_framework.pl Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
branch_transfer_limits.pl Bug 18247: Remove SQL queries from branch_transfer_limit.pl 2023-01-27 16:10:22 -03:00
branches.pl Bug 32721: (QA follow-up) Drop fields from API response 2023-10-19 16:00:56 -03:00
cash_registers.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
categories.pl Bug 35263: (QA follow-up) Update code 2023-11-08 09:58:53 -03:00
check_budget_parent.pl
check_parent_total.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
checkmarc.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
cities.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
classsources.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
clone-rules.pl
columns_settings.pl Bug 35278: Fix warn from column_settings.pl 2023-11-09 14:42:27 -03:00
columns_settings.yml Bug 35306: Fix Expired holds when modding request 2023-11-14 10:32:37 -03:00
credit_types.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
curbside_pickup.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
currency.pl
debit_types.pl Bug 32450: Noissuescharge debit type exclusions 2023-05-17 10:25:06 -03:00
desks.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
didyoumean.pl
edi_accounts.pl Bug 34261: Add missing argument to show_account 2023-07-14 15:23:16 -03:00
edi_ean_accounts.pl
identity_providers.pl Bug 32139: Set "update on login" correctly when creating new IdP 2022-11-09 13:32:46 -03:00
ill_batch_statuses.pl Bug 30719: (QA follow-up) Squash: 2023-10-17 14:45:18 -03:00
import_export_authtype.pl Bug 13952: (follow-up) JS translatability, clean warns, other 2022-04-04 16:23:46 +02:00
import_export_framework.pl Bug 13952: (follow-up) Fixing export on default biblio framework 2022-04-04 16:23:45 +02:00
item_circulation_alerts.pl Bug 32122: Correct permissions check on item circulation alerts 2022-11-07 11:17:40 -03:00
items_search_field.pl Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers 2023-10-17 14:45:29 -03:00
items_search_fields.pl Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers 2023-10-17 14:45:29 -03:00
itemtypes.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
koha2marclinks.pl Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
library_groups.pl Bug 9525: (QA follow-up) Tidy 2023-10-04 16:40:12 -04:00
localization.pl
marc-overlay-rules.pl Bug 33335: (QA follow-up) Polishing and comments 2023-05-12 17:50:09 -03:00
marc_subfields_structure.pl Bug 34393: Fix inconsistencies in MARC bibliographic framework page titles, breadcrumbs, and header 2023-10-09 11:41:30 -03:00
marctagstructure.pl Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-10-25 11:16:57 -03:00
matching-rules.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
oai_set_mappings.pl Bug 32797: Check if fields have a value, not if true 2023-02-03 10:30:07 -03:00
oai_sets.pl
overdrive.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
patron-attr-types.pl Bug 34517: Add option search patron attributes by default 2023-11-09 10:15:07 -03:00
preferences.pl Bug 31731: Offer user a dropdown of authorized values instead of a text field in preferences 2023-10-10 10:54:00 -03:00
restrictions.pl Bug 16223: Tidy 2023-10-11 12:13:12 -03:00
search_filters.pl Bug 17170: Minor fixes 2022-10-21 11:15:21 -03:00
share_content.pl
smart-rules.pl Bug 36447: Circ rules slow to load when many itemtypes and categories 2024-04-17 17:22:53 +02:00
sms_providers.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
smtp_servers.pl Bug 34616: Fix showing default server info on edit SMTP server page 2023-09-01 11:07:30 -03:00
sru_modmapping.pl
systempreferences.pl Bug 34369: Require CSRF token for updating system preferences 2023-09-25 18:18:40 -03:00
transfer_limits.pl
transport-cost-matrix.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
usage_statistics.pl
z3950servers.pl