Bug 26641: Optimize CatalogModuleRelink lookup
commit4dd798302a84acf5d4474affeaa61fc9c97ed68a
authorDavid Cook <dcook@prosentient.com.au>
Sun, 11 Oct 2020 23:47:45 +0000 (11 23:47 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Nov 2020 11:59:34 +0000 (4 12:59 +0100)
tree53e7f8aa8fdccec14092dd1d5fe9a68b72229de7
parentab2e3b0e890a45202a9c360f444917a0ff336d50
Bug 26641: Optimize CatalogModuleRelink lookup

This patch moves the CatalogModuleRelink lookup outside the loop to
improve performance (especially for large databases), and includes a
tester friendly test plan.

Test plan:
0. Using koha-testing-docker
1. koha-shell -c "./misc/link_bibs_to_authorities.pl -l --test" kohadev
2. Note 436 bibs checked, 1315 headings linked, 676 headings unlinked
3. koha-shell -c "./misc/link_bibs_to_authorities.pl -l --test -g 700" kohadev
4. Note 436 bibs checked, 248 headings linked, 111 headings unlinked
5. Note output appear to all be names (rather than subjects or other authorities)
6. Note also that the 2nd run with -g 700 is almost 2x faster than without

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/link_bibs_to_authorities.pl