http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7073
Bug #: 7073
Summary: GetCOinSBiblio should take $record, not $biblionumber
Classification: Unclassified
Change sponsored?: ---
Product: Koha
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P5
Component: Architecture, internals, and plumbing
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
GetCOinSBiblio is summoned three places in Koha so far:
C4::VirtualShelves/Page.pm, opac/opac-search.pl and opac/opac-detail.pl. It
takes in a biblionumber, then immediately calls GetMarcBiblio on that to get
the record. This is a very expensive call.
The kicker is that in 2 of the 3 contexts, we've ALREADY GOT the $record.
We're pulling it in twice per title, and the number of titles we loop through
is either OPACnumsearchresults or numsearchresults. The default of 20 has us
making 40 calls to GetMarcBiblio... at several dozen milliseconds per call,
that's a lot of time!
If we change the GetCOinSBbiblio routine to take in a $record object instead,
we save those calls on Lists and opac/opac-detail.pl. We'd just need to call
GetMarcBiblio in the search results before calling GetCOinSBiblio... which is
just moving the call from inside the subroutine to outside (no performance
loss).
Patch forthcoming.
--
Configure bugmail:
http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/