Bug 19279: performance of linked items in search
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Sep 2017 15:20:38 +0000 (17:20 +0200)
committerJoy Nelson <joy@bywatersolutions.com>
Fri, 3 Apr 2020 20:16:24 +0000 (20:16 +0000)
commitdff8f391c87192a08995b6596a4cfb744e1efc31
tree9e6d15156f699f022bd51bf2658a237bea770b3b
parent09b8c38a8264c55ae5e7187cb76e608a072729fd
Bug 19279: performance of linked items in search

When catalog has fields 773 (461 in UNIMARC), those linked items are fetched for display in search results.
Looks like the code could be more performant by replacing item search by $9 with direct call with GetMarcItem().

Test plan :
1) Enable system preference EasyAnalyticalRecords
2) Get a record A with a lot of items, it will be the 'Host record'
3) Click on 'Analytics' on this record
4) On one of its items (say item A1) click on 'Create analytics' to
create record B
5) Enter the same title as record A and all mandatory fields
6) Edit field 773 (461 in UNIMARC)
6) Check that $0 contains the biblionumber of record A
7) Check that $9 contains the itemnumber of item A1
8) Perform a search on record A title, be sure you see record B with
other results
=> Compare execution times with and without patch

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
C4/Search.pm