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>
(cherry picked from commit
aa2befcec89b867c536d2f38203dc817adcf2b5c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>