]> git.koha-community.org Git - koha.git/commit
Bug 36672: Circulation rules are performing too many lookups
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 26 Apr 2024 17:41:06 +0000 (17:41 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 10 Jun 2024 15:22:01 +0000 (16:22 +0100)
commitaa2befcec89b867c536d2f38203dc817adcf2b5c
tree43738c4b4187e7117154756c7ad9afcb3e515cd7
parent76075976ea655f6a9811cbc129fe7799d04b505b
Bug 36672: Circulation rules are performing too many lookups

Looking at the template, for every section after the main rules block we loop over categories or itemtypes, and lookup the value for each rule name.

In systems with large numbers of categories and item types this becomes very slow.

In the rules section, we have already built a hash of rules by category and itemtype - we should continue to use this throughout the page.

Test Plan:
1) Apply this patch
2) For each rule section, create and delete a rule
3) No change in behavior should be noted!

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt