Bug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed...
authorNick Clemens <nick@bywatersolutions.com>
Wed, 25 Aug 2021 15:26:23 +0000 (15:26 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 25 Apr 2022 20:00:22 +0000 (10:00 -1000)
commit8e1d5d4b8fa416992abd072a0453d280ea34348e
tree989d4695e0b49e632994623d1fc4b86849e612b8
parent7e98a8a686ccf112f7aeaa181c4e5e19ec750277
Bug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed AV at once

This patch updates the searchResuls code to pass through the pre-constructed branches and itemtype lookups
to XSLTParse4Display to avoid repeating this

It also updates getAuthorisedValues4MARCSubfields to fetch the values for mapped subfields and pass
then through to transforMarc4XSLT

Note that we currently blank invalid branches and itemtypes - I presrve this, we should open another bug
if we want to change this behaviour

Changes are covered by tests

To test:
1 - Perform searches in OPAC and staff client that return many records
2 - Use the 'Network' tab on the browser console (opened with F12 usually) to see the time taken
3 - Note the speed before the patch
4 - Apply patch
5 - restart all the things
6 - Note improvement in speed

**Note: The improvement is more drastic the more items per record, try adding large numbers of items to your search results to test**

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Search.pm
C4/XSLT.pm