[Koha-bugs] [Bug 24562] addbiblio.pl overloading CPU
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jul 20 04:42:34 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24562
--- Comment #26 from David Cook <dcook at prosentient.com.au> ---
Wow, FindDuplicate is so inefficient.
It looks like we only ever use the 1st result from FindDuplicate, but we return
a copy of an array that (in theory) can contain up to 50 results.
(Also there is a little syntax problem in Search.t although it doesn't affect
the test outcome.)
--
my ( $error, $searchresults, undef ) =
$searcher->simple_search_compat($query,0,50);
--
grep -R "FindDuplicate(" *
acqui/addorderiso2709.pl: $duplifound = 1 if
FindDuplicate($marcrecord);
acqui/neworderempty.pl: ($biblionumber,$duplicatetitle) =
FindDuplicate($marcrecord);
C4/Search.pm:($biblionumber,$biblionumber,$title) = FindDuplicate($record);
cataloguing/addbiblio.pl: ( $duplicatebiblionumber, $duplicatetitle ) =
FindDuplicate($record);
opac/opac-suggestions.pl: if ( my ($duplicatebiblionumber, $duplicatetitle)
= FindDuplicate($biblio) ) {
suggestion/suggestion.pl: elsif ( !$suggestion_only->{suggestionid} && ( my
($duplicatebiblionumber, $duplicatetitle) = FindDuplicate($biblio) ) &&
!$save_confirmed ) {
t/db_dependent/Search.t: ($biblionumber,undef,$title) =
FindDuplicate($record);
t/db_dependent/Search.t: ($biblionumber,undef,$title) =
FindDuplicate($record);
t/db_dependent/Search.t: warning_is {
C4::Search::FindDuplicate($record_1);}
t/db_dependent/Search.t: warning_is {
C4::Search::FindDuplicate($record_2);}
t/db_dependent/Search.t: warning_is {
C4::Search::FindDuplicate($record_3);}
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list