Koha/C4
Jacek Ablewicz eb04d174d9 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@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-04-07 00:03:51 +00:00
..
AuthoritiesMarc Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Barcodes Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Bookseller
ClassSortRoutine Bug 16011: $VERSION - Remove use vars qw(); 2016-03-24 17:20:39 +00:00
Creators Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
External Bug 16011 reintroduced VERSION variable needs declaration 2016-03-29 22:38:54 +00:00
Form Bug 15099: Move admin/categorie.pl to admin/categories.pl 2015-12-30 16:36:41 +00:00
Heading Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
ILSDI Bug 14257 - Add show_attributes to GetPatronInfo 2016-03-31 20:31:06 +00:00
Installer Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Labels Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Linker
Members Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
OAI
Output
Patroncards Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Reports Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Search
Serials Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
SIP Bug 14512 - Add support for AV field to Koha's SIP2 Server 2016-03-31 20:29:18 +00:00
Utils Bug 16177: Fix tests for ColumnsSsettings.t 2016-04-01 19:08:23 +00:00
Accounts.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Acquisition.pm Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Auth.pm Bug 10988 - Fixes for comments 57 and 58 2016-04-01 19:25:35 +00:00
Auth_cas_servers.yaml.orig
Auth_with_cas.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Auth_with_ldap.pm Bug 11807: (follow-up) remove date conversions 2016-04-01 19:23:42 +00:00
Auth_with_shibboleth.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
AuthoritiesMarc.pm Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date 2016-04-01 19:04:38 +00:00
BackgroundJob.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Barcodes.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Biblio.pm Bug 16168: Eliminate unneeded C4::Context->dbh calls in C4/Biblio.pm 2016-04-07 00:03:51 +00:00
Bookseller.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Boolean.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Branch.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Breeding.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Budgets.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Calendar.pm Bug 16011: $VERSION - remove use vars $VERSION 2016-03-24 17:20:26 +00:00
Category.pm
Charset.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Circulation.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
ClassSortRoutine.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ClassSource.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Context.pm Bug 16068: Do not cache overridden prefs 2016-04-01 19:19:31 +00:00
Contract.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
CourseReserves.pm Bug 16011: $VERSION - remove use vars $VERSION 2016-03-24 17:20:26 +00:00
Creators.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Csv.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Debug.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Heading.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
HoldsQueue.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
HTML5Media.pm Bug 14168: (followup) require WWW::YouTube::Download only when syspref enabled 2016-03-03 18:47:03 +00:00
Images.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ImportBatch.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ImportExportFramework.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
InstallAuth.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Installer.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
ItemCirculationAlertPreference.pm Bug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used 2016-01-27 20:46:58 +00:00
Items.pm Bug 16004: Replace items.new with items.new_status 2016-03-31 16:57:13 +00:00
Koha.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Labels.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Languages.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Letters.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Linker.pm
Log.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
MarcModificationTemplates.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Matcher.pm Bug 15745: C4::Matcher gets CCL parsing error if term contains ? (question mark) 2016-04-01 19:12:51 +00:00
Members.pm Bug 10612: (QA followup) 2016-04-01 19:52:14 +00:00
Message.pm
NewsChannels.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Output.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Overdues.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Patroncards.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Print.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Ratings.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Record.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Reports.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Reserves.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Review.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Ris.pm Bug 16199: Remove C4::Ris::charconv 2016-04-06 23:59:45 +00:00
RotatingCollections.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Scheduler.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Scrubber.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Search.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Serials.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Service.pm
ShelfBrowser.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
SMS.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
SocialData.pm
Stats.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Suggestions.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Tags.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Templates.pm Bug 15968: Unnecessary loop in C4::Templates 2016-03-07 17:20:00 +00:00
TmplToken.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TmplTokenType.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TTParser.pm
UsageStats.pm Bug 4941: Remove the singleBranchMode system preference 2016-02-26 12:13:09 +00:00
XISBN.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
XSLT.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00