[Koha-bugs] [Bug 16168] Eliminate unneeded C4::Context->dbh calls in C4/Biblio.pm
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Apr 3 22:28:43 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16168
Katrin Fischer <katrin.fischer at bsz-bw.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #49679|0 |1
is obsolete| |
--- Comment #6 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 49828
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49828&action=edit
[PASSED QA] Bug 16168: Eliminate unneeded C4::Context->dbh calls in
C4/Biblio.pm
Right now, ->dbh calls are actually quite expensive (they involve
DB connection health checks, each and every time). Some speed-sensitive
subroutines inside C4/Biblio.pm (GetMarcStructure, GetAuthorisedValueDesc)
have this statement
my $dbh = C4::Context->dbh;
on top of the code, but they don't always/don't usually need DB
handle - not at that stage at least. This trivial patch eliminates
unneeded ->dbh calls in those subroutines. With it, average
GetMarcStructure() running time goes down from 14 miliseconds
to 9 miliseconds (on top of Bug 16166), it also makes catalogue
search profiling a bit easier.
Test plan:
1) apply patch
2) ensure that catalogue searches are still working
3) run t/*Biblio* tests
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list