[Koha-bugs] [Bug 31073] ThingISBN API causes slowness when there are many editions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 7 18:18:31 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31073

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kyle at bywatersolutions.com

--- Comment #3 from Kyle M Hall <kyle at bywatersolutions.com> ---
The problem code is in C4::XISBN:

    # loop through each ISBN and scope to the local collection
    for my $response_data( @{ $response->{ isbn } } ) {
        next if $unique_xisbns->{ $response_data->{content} };
        $unique_xisbns->{ $response_data->{content} }++;
        my $xbiblio= _get_biblio_from_xisbn($response_data->{content});
        next unless $xbiblio;
        push @xisbns, $xbiblio if $xbiblio && $xbiblio->{biblionumber} ne
$biblionumber;
    }

Basically, we run a search for each returned isbn to see if it's in our
catalog. Some of these titles have hundreds of ISBNs, especially for the
classics. For example, the brothers karamazov has nearly 500 isbns in
ThingISBN.

The solution could be
A) convert these hundereds of small queries into one or more big queries
and/or
B) move the this to the front end where we get the ThingISBN data via
javascript then search our own catalog via the rest api

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list