← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 11:58:52 2013
Reported on Tue Oct 15 12:01:08 2013

Filename/usr/share/koha/opac/cgi-bin/opac/opac-search.pl
StatementsExecuted 728 statements in 21.9ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
171839122.01s2.01sDBI::st::::execute DBI::st::execute (xsub)
1484221.40s1.40sDBI::db::::ping DBI::db::ping (xsub)
16111155ms170msDBI::db::::selectrow_array DBI::db::selectrow_array (xsub)
118339583.3ms83.3msDBI::st::::fetchrow DBI::st::fetchrow (xsub)
200523753.9ms91.0msDBI::st::::fetchrow_hashref DBI::st::fetchrow_hashref (xsub)
251146.1ms46.1msXML::LibXSLT::Stylesheet::::transform XML::LibXSLT::Stylesheet::transform (xsub)
1653411223.0ms160msDBI::db::::prepare DBI::db::prepare (xsub)
3306551320.8ms20.8msDBI::common::::DESTROY DBI::common::DESTROY (xsub)
201127919.7ms19.7msDBI::common::::FETCH DBI::common::FETCH (xsub)
200523717.5ms17.5msDBI::st::::fetch DBI::st::fetch (xsub)
13667414.4ms14.4msDBI::st::::fetchrow_array DBI::st::fetchrow_array (xsub)
53213.6ms13.6msDBI::db::::do DBI::db::do (xsub)
11112.3ms49.6msmain::::BEGIN@48 main::BEGIN@48
4869231311.0ms11.0msUNIVERSAL::::isa UNIVERSAL::isa (xsub)
11110.4ms954msmain::::BEGIN@46 main::BEGIN@46
165355135.49ms5.49msDBD::_mem::common::::DESTROY DBD::_mem::common::DESTROY (xsub)
1114.38ms232msmain::::BEGIN@31 main::BEGIN@31
1113.98ms6.55msmain::::BEGIN@51 main::BEGIN@51
1112.40ms65.3msmain::::BEGIN@45 main::BEGIN@45
25111.46ms1.46msXML::LibXSLT::Stylesheet::::_output_string XML::LibXSLT::Stylesheet::_output_string (xsub)
3922291.18ms1.18msUNIVERSAL::::can UNIVERSAL::can (xsub)
12721.01ms1.01msDBI::common::::STORE DBI::common::STORE (xsub)
13243927µs927µsDBI::st::::finish DBI::st::finish (xsub)
111831µs1.58msmain::::BEGIN@53 main::BEGIN@53
111742µs5.34msmain::::BEGIN@54 main::BEGIN@54
2833607µs2.67msDBI::st::::fetchall_arrayref DBI::st::fetchall_arrayref (xsub)
111562µs7.33msmain::::BEGIN@25 main::BEGIN@25
26811422µs422µsInternals::::SvREADONLY Internals::SvREADONLY (xsub)
11119318µs318µsUNIVERSAL::::VERSION UNIVERSAL::VERSION (xsub)
26895276µs276µsRegexp::::DESTROY Regexp::DESTROY (xsub)
871193µs193µsmain::::CORE:match main::CORE:match (opcode)
731159µs159µsmain::::CORE:sort main::CORE:sort (opcode)
11174µs1.50msDBI::db::::selectall_arrayref DBI::db::selectall_arrayref (xsub)
11161µs188µsmain::::_input_cgi_parse main::_input_cgi_parse
33149µs70µsC4::Templates::::interface C4::Templates::interface
11134µs8.56msDBI::dr::::connect DBI::dr::connect (xsub)
33130µs44µsC4::Templates::::lang C4::Templates::lang
22128µs38µsC4::Templates::::theme C4::Templates::theme
11125µs25µsDBI::dr::::disconnect_all DBI::dr::disconnect_all (xsub)
11123µs653µsmain::::BEGIN@49 main::BEGIN@49
11121µs87µsmain::::BEGIN@57 main::BEGIN@57
11121µs62µsmain::::BEGIN@47 main::BEGIN@47
22119µs30µsC4::Templates::::filename C4::Templates::filename
11118µs484µsmain::::BEGIN@50 main::BEGIN@50
11117µs191µsmain::::BEGIN@64 main::BEGIN@64
11117µs154µsmain::::BEGIN@52 main::BEGIN@52
22116µs23µsC4::Templates::::preferredtheme C4::Templates::preferredtheme
41116µs16µsB::SV::::FLAGS B::SV::FLAGS (xsub)
11116µs78µsmain::::BEGIN@59 main::BEGIN@59
11116µs155µsmain::::BEGIN@58 main::BEGIN@58
11115µs15µsmain::::CORE:regcomp main::CORE:regcomp (opcode)
11114µs92µsmain::::BEGIN@56 main::BEGIN@56
11112µs1.87msmain::::BEGIN@85 main::BEGIN@85
11110µs10µsDBI::db::::connected DBI::db::connected (xsub)
1118µs8µsDBI::Const::GetInfo::ODBC::::CORE:matchDBI::Const::GetInfo::ODBC::CORE:match (opcode)
3318µs8µsmain::::CORE:subst main::CORE:subst (opcode)
1116µs9µsC4::Templates::::activethemes C4::Templates::activethemes
1115µs7µsC4::Templates::::htdocs C4::Templates::htdocs
1115µs5µsDBI::Const::GetInfo::ANSI::::CORE:matchDBI::Const::GetInfo::ANSI::CORE:match (opcode)
0000s0smain::::RUNTIME main::RUNTIME
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
021423µsProfile data that couldn't be associated with a specific line:
# spent 137µs making 8 calls to Template::Document::AUTOLOAD, avg 17µs/call # spent 129µs making 1 call to DBI::END # spent 66µs making 1 call to XML::LibXML::END # spent 27µs making 1 call to Template::Provider::DESTROY # spent 14µs making 1 call to Template::Context::DESTROY # spent 11µs making 1 call to C4::Tags::INIT # spent 7µs making 1 call to CGI::DESTROY # spent 5µs making 1 call to C4::Auth::END # spent 5µs making 1 call to C4::Search::END # spent 4µs making 1 call to C4::Accounts::END # spent 4µs making 1 call to C4::Budgets::END # spent 4µs making 1 call to C4::Members::END # spent 4µs making 1 call to C4::Output::END # spent 3µs making 1 call to Template::Stash::XS::DESTROY
114.41ms#!/usr/bin/perl
2
3# Copyright 2008 Garry Collum and the Koha Development team
4# Copyright 2010 BibLibre
5# Copyright 2011 KohaAloha, NZ
6# Copyright 2012 Catalyst IT, NZ
7#
8# This file is part of Koha.
9#
10# Koha is free software; you can redistribute it and/or modify it under the
11# terms of the GNU General Public License as published by the Free Software
12# Foundation; either version 2 of the License, or (at your option) any later
13# version.
14#
15# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License along
20# with Koha; if not, write to the Free Software Foundation, Inc.,
21# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
23# Script to perform searching
24# Mostly copied from search.pl, see POD there
253228µs27.43ms
# spent 7.33ms (562µs+6.77) within main::BEGIN@25 which was called: # once (562µs+6.77ms) by main::RUNTIME at line 25
use Modern::Perl;
# spent 7.33ms making 1 call to main::BEGIN@25 # spent 97µs making 1 call to Modern::Perl::import
26
27## STEP 1. Load things that are used in both search page and
28# results page and decide which template to load, operations
29# to perform, etc.
30## load Koha modules
313304µs2338ms
# spent 232ms (4.38+228) within main::BEGIN@31 which was called: # once (4.38ms+228ms) by main::RUNTIME at line 31
use C4::Context;
# spent 232ms making 1 call to main::BEGIN@31 # spent 105ms making 1 call to C4::Context::import
32
3317µs12.05msmy $searchengine = C4::Context->preference("SearchEngine");
# spent 2.05ms making 1 call to C4::Context::preference
3413µsfor ( $searchengine ) {
35258µs134µs when ( /^Solr$/ ) {
# spent 34µs making 1 call to main::CORE:match
36 warn "We use Solr";
37 require 'opac/search.pl';
38 exit;
39 }
4018µs when ( /^Zebra$/ ) {
# spent 8µs making 1 call to main::CORE:match
41
42 }
43}
44
453183µs265.5ms
# spent 65.3ms (2.40+62.9) within main::BEGIN@45 which was called: # once (2.40ms+62.9ms) by main::RUNTIME at line 45
use C4::Output;
# spent 65.3ms making 1 call to main::BEGIN@45 # spent 219µs making 1 call to Exporter::import
463174µs2954ms
# spent 954ms (10.4+943) within main::BEGIN@46 which was called: # once (10.4ms+943ms) by main::RUNTIME at line 46
use C4::Auth qw(:DEFAULT get_session ParseSearchHistoryCookie);
# spent 954ms making 1 call to main::BEGIN@46 # spent 334µs making 1 call to Exporter::import
47349µs2104µs
# spent 62µs (21+42) within main::BEGIN@47 which was called: # once (21µs+42µs) by main::RUNTIME at line 47
use C4::Languages qw(getAllLanguages);
# spent 62µs making 1 call to main::BEGIN@47 # spent 42µs making 1 call to Exporter::import
483216µs249.8ms
# spent 49.6ms (12.3+37.3) within main::BEGIN@48 which was called: # once (12.3ms+37.3ms) by main::RUNTIME at line 48
use C4::Search;
# spent 49.6ms making 1 call to main::BEGIN@48 # spent 278µs making 1 call to Exporter::import
49347µs21.28ms
# spent 653µs (23+630) within main::BEGIN@49 which was called: # once (23µs+630µs) by main::RUNTIME at line 49
use C4::Biblio; # GetBiblioData
# spent 653µs making 1 call to main::BEGIN@49 # spent 630µs making 1 call to Exporter::import
50348µs2949µs
# spent 484µs (18+466) within main::BEGIN@50 which was called: # once (18µs+466µs) by main::RUNTIME at line 50
use C4::Koha;
# spent 484µs making 1 call to main::BEGIN@50 # spent 466µs making 1 call to Exporter::import
513196µs26.69ms
# spent 6.55ms (3.98+2.57) within main::BEGIN@51 which was called: # once (3.98ms+2.57ms) by main::RUNTIME at line 51
use C4::Tags qw(get_tags);
# spent 6.55ms making 1 call to main::BEGIN@51 # spent 140µs making 1 call to Exporter::import
52335µs2291µs
# spent 154µs (17+137) within main::BEGIN@52 which was called: # once (17µs+137µs) by main::RUNTIME at line 52
use C4::Branch; # GetBranches
# spent 154µs making 1 call to main::BEGIN@52 # spent 137µs making 1 call to Exporter::import
533152µs11.58ms
# spent 1.58ms (831µs+754µs) within main::BEGIN@53 which was called: # once (831µs+754µs) by main::RUNTIME at line 53
use C4::SocialData;
# spent 1.58ms making 1 call to main::BEGIN@53
543144µs25.46ms
# spent 5.34ms (742µs+4.60) within main::BEGIN@54 which was called: # once (742µs+4.60ms) by main::RUNTIME at line 54
use C4::Ratings;
# spent 5.34ms making 1 call to main::BEGIN@54 # spent 118µs making 1 call to Exporter::import
55
56360µs2169µs
# spent 92µs (14+78) within main::BEGIN@56 which was called: # once (14µs+78µs) by main::RUNTIME at line 56
use POSIX qw(ceil floor strftime);
# spent 92µs making 1 call to main::BEGIN@56 # spent 78µs making 1 call to POSIX::import
57347µs2153µs
# spent 87µs (21+66) within main::BEGIN@57 which was called: # once (21µs+66µs) by main::RUNTIME at line 57
use URI::Escape;
# spent 87µs making 1 call to main::BEGIN@57 # spent 66µs making 1 call to Exporter::import
58345µs2295µs
# spent 155µs (16+140) within main::BEGIN@58 which was called: # once (16µs+140µs) by main::RUNTIME at line 58
use JSON qw/decode_json encode_json/;
# spent 155µs making 1 call to main::BEGIN@58 # spent 140µs making 1 call to JSON::import
59358µs2140µs
# spent 78µs (16+62) within main::BEGIN@59 which was called: # once (16µs+62µs) by main::RUNTIME at line 59
use Business::ISBN;
# spent 78µs making 1 call to main::BEGIN@59 # spent 62µs making 1 call to Exporter::import
60
6116µs11.91msmy $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
# spent 1.91ms making 1 call to C4::Context::preference
62# create a new CGI object
63# FIXME: no_undef_params needs to be tested
643189µs2365µs
# spent 191µs (17+174) within main::BEGIN@64 which was called: # once (17µs+174µs) by main::RUNTIME at line 64
use CGI qw('-no_undef_params');
# spent 191µs making 1 call to main::BEGIN@64 # spent 174µs making 1 call to CGI::import
6517µs14.25msmy $cgi = new CGI;
# spent 4.25ms making 1 call to CGI::new
66
6712µs110µsmy $branch_group_limit = $cgi->param("branch_group_limit");
# spent 10µs making 1 call to CGI::param
681400nsif ( $branch_group_limit ) {
69 if ( $branch_group_limit =~ /^multibranchlimit-/ ) {
70 # For search groups we are going to convert this branch_group_limit CGI
71 # parameter into a multibranchlimit CGI parameter for the purposes of
72 # actually performing the query
73 $cgi->param(
74 -name => 'multibranchlimit',
75 -values => substr($branch_group_limit, 17)
76 );
77 } else {
78 $cgi->append(
79 -name => 'limit',
80 -values => [ $branch_group_limit ]
81 );
82 }
83}
84
85
# spent 1.87ms (12µs+1.85) within main::BEGIN@85 which was called: # once (12µs+1.85ms) by main::RUNTIME at line 90
BEGIN {
8619µs11.85ms if (C4::Context->preference('BakerTaylorEnabled')) {
# spent 1.85ms making 1 call to C4::Context::preference
87 require C4::External::BakerTaylor;
88 import C4::External::BakerTaylor qw(&image_url &link_url);
89 }
9018.27ms11.87ms}
# spent 1.87ms making 1 call to main::BEGIN@85
91
921900nsmy ($template,$borrowernumber,$cookie);
9316µs14.23msmy $lang = C4::Templates::getlanguage($cgi, 'opac');
# spent 4.23ms making 1 call to C4::Templates::getlanguage
94# decide which template to use
951300nsmy $template_name;
961700nsmy $template_type = 'basic';
9714µs113µsmy @params = $cgi->param("limit");
# spent 13µs making 1 call to CGI::param
98
99
10013µs19µsmy $format = $cgi->param("format") || '';
# spent 9µs making 1 call to CGI::param
10114µs12.02msmy $build_grouped_results = C4::Context->preference('OPACGroupResults');
# spent 2.02ms making 1 call to C4::Context::preference
102111µs221µsif ($format =~ /(rss|atom|opensearchdescription)/) {
# spent 19µs making 1 call to CGI::param # spent 2µs making 1 call to main::CORE:match
103 $template_name = 'opac-opensearch.tmpl';
104}
105elsif (@params && $build_grouped_results) {
106 $template_name = 'opac-results-grouped.tmpl';
107}
108elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
109 $template_name = 'opac-results.tmpl';
110}
111else {
112 $template_name = 'opac-advsearch.tmpl';
113 $template_type = 'advsearch';
114}
115# load the template
116124µs2363ms($template, $borrowernumber, $cookie) = get_template_and_user({
# spent 361ms making 1 call to C4::Auth::get_template_and_user # spent 2.22ms making 1 call to C4::Context::preference
117 template_name => $template_name,
118 query => $cgi,
119 type => "opac",
120 authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
121 }
122);
123113µs21.80msif ($template_name eq 'opac-results.tmpl') {
# spent 1.80ms making 1 call to C4::Context::preference # spent 9µs making 1 call to C4::Templates::param
124 $template->param('COinSinOPACResults' => C4::Context->preference('COinSinOPACResults'));
125}
126
127# get biblionumbers stored in the cart
1281800nsmy @cart_list;
129
13017µs181µsif($cgi->cookie("bib_list")){
# spent 81µs making 1 call to CGI::cookie
131 my $cart_list = $cgi->cookie("bib_list");
132 @cart_list = split(/\//, $cart_list);
133}
134
13512µsif ($format eq 'rss2' or $format eq 'opensearchdescription' or $format eq 'atom') {
136 $template->param($format => 1);
137 $template->param(timestamp => strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime)) if ($format eq 'atom');
138 # FIXME - the timestamp is a hack - the biblio update timestamp should be used for each
139 # entry, but not sure if that's worth an extra database query for each bib
140}
14118µs312µsif (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
# spent 7µs making 2 calls to C4::Context::preference, avg 3µs/call # spent 6µs making 1 call to C4::Templates::param
142 $template->param('UNIMARC' => 1);
143}
144elsif (C4::Context->preference("marcflavour") eq "MARC21" ) {
145 $template->param('usmarc' => 1);
146}
147110µs21.69ms$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
# spent 1.68ms making 1 call to C4::Context::preference # spent 14µs making 1 call to C4::Templates::param
148141µs22.03ms$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
# spent 1.99ms making 1 call to C4::Context::preference # spent 49µs making 1 call to C4::Templates::param
149
150114µs21.79ms$template->param(
# spent 1.77ms making 1 call to C4::Context::preference # spent 16µs making 1 call to C4::Templates::param
151 OpacStarRatings => C4::Context->preference("OpacStarRatings") );
152
15317µs19µsif (C4::Context->preference('BakerTaylorEnabled')) {
# spent 9µs making 1 call to C4::Context::preference
154 $template->param(
155 BakerTaylorEnabled => 1,
156 BakerTaylorImageURL => &image_url(),
157 BakerTaylorLinkURL => &link_url(),
158 BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
159 );
160}
161
162314µs16µsif (C4::Context->preference('TagsEnabled')) {
# spent 6µs making 1 call to C4::Context::preference
163110µs $template->param(TagsEnabled => 1);
# spent 10µs making 1 call to C4::Templates::param
164 foreach (qw(TagsShowOnList TagsInputOnList)) {
165220µs33.22ms C4::Context->preference($_) and $template->param($_ => 1);
# spent 3.21ms making 2 calls to C4::Context::preference, avg 1.60ms/call # spent 12µs making 1 call to C4::Templates::param
166 }
167}
168
169## URI Re-Writing
170# Deprecated, but preserved because it's interesting :-)
171# The same thing can be accomplished with mod_rewrite in
172# a more elegant way
173#
174#my $rewrite_flag;
175#my $uri = $cgi->url(-base => 1);
176#my $relative_url = $cgi->url(-relative=>1);
177#$uri.="/".$relative_url."?";
178#warn "URI:$uri";
179#my @cgi_params_list = $cgi->param();
180#my $url_params = $cgi->Vars;
181#
182#for my $each_param_set (@cgi_params_list) {
183# $uri.= join "", map "\&$each_param_set=".$_, split("\0",$url_params->{$each_param_set}) if $url_params->{$each_param_set};
184#}
185#warn "New URI:$uri";
186# Only re-write a URI if there are params or if it already hasn't been re-written
187#unless (($cgi->param('r')) || (!$cgi->param()) ) {
188# print $cgi->redirect( -uri=>$uri."&r=1",
189# -cookie => $cookie);
190# exit;
191#}
192
193# load the branches
194
195111µs710.7msmy $branches = GetBranches(); # used later in *getRecords, probably should be internalized by those functions after caching in C4::Branch is established
# spent 10.7ms making 1 call to C4::Branch::GetBranches # spent 14µs making 4 calls to DBI::common::DESTROY, avg 3µs/call # spent 5µs making 2 calls to DBD::_mem::common::DESTROY, avg 2µs/call
196122µs51.94ms$template->param(
# spent 1.91ms making 1 call to C4::Branch::GetBranchCategories # spent 26µs making 1 call to C4::Templates::param # spent 6µs making 2 calls to DBI::common::DESTROY, avg 3µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
197 searchdomainloop => GetBranchCategories(undef,'searchdomain'),
198);
199
200# load the language limits (for search)
20119µs4162msmy $languages_limit_loop = getAllLanguages($lang);
# spent 162ms making 1 call to C4::Languages::getAllLanguages # spent 7µs making 2 calls to DBI::common::DESTROY, avg 4µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
20218µs115µs$template->param(search_languages_loop => $languages_limit_loop,);
# spent 15µs making 1 call to C4::Templates::param
203
204# load the Type stuff
20517µs43.05msmy $itemtypes = GetItemTypes;
# spent 3.03ms making 1 call to C4::Koha::GetItemTypes # spent 16µs making 2 calls to DBI::common::DESTROY, avg 8µs/call # spent 5µs making 1 call to DBD::_mem::common::DESTROY
206# the index parameter is different for item-level itemtypes
20718µs111µsmy $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
# spent 11µs making 1 call to C4::Context::preference
2081500nsmy @advancedsearchesloop;
2091300nsmy $cnt;
21014µs12.34msmy $advanced_search_types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
# spent 2.34ms making 1 call to C4::Context::preference
21117µsmy @advanced_search_types = split(/\|/, $advanced_search_types);
212
21313µsforeach my $advanced_srch_type (@advanced_search_types) {
21417149µs if ($advanced_srch_type eq 'itemtypes') {
215 # itemtype is a special case, since it's not defined in authorized values
216 my @itypesloop;
217174µs foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
# spent 74µs making 1 call to main::CORE:sort
21846248µs232.46ms my %row =( number=>$cnt++,
# spent 2.46ms making 23 calls to C4::Koha::getitemtypeimagelocation, avg 107µs/call
219 ccl => "$itype_or_itemtype,phr",
220 code => $thisitemtype,
221 description => $itemtypes->{$thisitemtype}->{'description'},
222 imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
223 );
224 push @itypesloop, \%row;
225 }
226 my %search_code = ( advanced_search_type => $advanced_srch_type,
227 code_loop => \@itypesloop );
228 push @advancedsearchesloop, \%search_code;
229 } else {
230 # covers all the other cases: non-itemtype authorized values
23125.47ms my $advsearchtypes = GetAuthorisedValues($advanced_srch_type, '', 'opac');
# spent 5.47ms making 2 calls to Memoize::__ANON__[(eval 998)[Memoize.pm:73]:1], avg 2.74ms/call
232 my @authvalueloop;
233 for my $thisitemtype (@$advsearchtypes) {
23452583µs26220µs my %row =(
# spent 220µs making 26 calls to C4::Koha::getitemtypeimagelocation, avg 8µs/call
235 number=>$cnt++,
236 ccl => $advanced_srch_type,
237 code => $thisitemtype->{authorised_value},
238 description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'},
239 imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
240 );
241 push @authvalueloop, \%row;
242 }
243 my %search_code = ( advanced_search_type => $advanced_srch_type,
244 code_loop => \@authvalueloop );
245 push @advancedsearchesloop, \%search_code;
246 }
247}
2481185µs1188µs$template->param(advancedsearchesloop => \@advancedsearchesloop);
# spent 188µs making 1 call to C4::Templates::param
249
250# # load the itypes (Called item types in the template -- just authorized values for searching)
251# my ($itypecount,@itype_loop) = GetCcodes();
252# $template->param(itypeloop=>\@itype_loop,);
253
254# The following should only be loaded if we're bringing up the advanced search template
25512µsif ( $template_type && $template_type eq 'advsearch' ) {
256 # load the servers (used for searching -- to do federated searching, etc.)
257 my $primary_servers_loop;# = displayPrimaryServers();
258 $template->param(outer_servers_loop => $primary_servers_loop,);
259
260 my $secondary_servers_loop;
261 $template->param(outer_sup_servers_loop => $secondary_servers_loop,);
262
263 # set the default sorting
264 if ( C4::Context->preference('OPACdefaultSortField')
265 && C4::Context->preference('OPACdefaultSortOrder') ) {
266 my $default_sort_by =
267 C4::Context->preference('OPACdefaultSortField') . '_'
268 . C4::Context->preference('OPACdefaultSortOrder');
269 $template->param( sort_by => $default_sort_by );
270 }
271
272 # determine what to display next to the search boxes (ie, boolean option
273 # shouldn't appear on the first one, scan indexes should, adding a new
274 # box should only appear on the last, etc.
275 my @search_boxes_array;
276 my $search_boxes_count = 3; # begin whith 3 boxes
277 for (my $i=1;$i<=$search_boxes_count;$i++) {
278 # if it's the first one, don't display boolean option, but show scan indexes
279 if ($i==1) {
280 push @search_boxes_array,
281 {
282 scan_index => 1,
283 };
284
285 }
286 # if it's the last one, show the 'add field' box
287 elsif ($i==$search_boxes_count) {
288 push @search_boxes_array,
289 {
290 boolean => 1,
291 add_field => 1,
292 };
293 }
294 else {
295 push @search_boxes_array,
296 {
297 boolean => 1,
298 };
299 }
300
301 }
302 $template->param(uc( C4::Context->preference("marcflavour")) => 1, # we already did this for UNIMARC
303 advsearch => 1,
304 search_boxes_loop => \@search_boxes_array);
305
306 # use the global setting by default
307 if ( C4::Context->preference("expandedSearchOption") == 1 ) {
308 $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
309 }
310 # but let the user override it
311 if (defined $cgi->param('expanded_options')) {
312 if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
313 $template->param( expanded_options => $cgi->param('expanded_options'));
314 }
315 }
316
317 if (C4::Context->preference('OPACNumbersPreferPhrase')) {
318 $template->param('numbersphr' => 1);
319 }
320
321 output_html_with_http_headers $cgi, $cookie, $template->output;
322 exit;
323}
324
325### OK, if we're this far, we're performing an actual search
326
327# Fetch the paramater list as a hash in scalar context:
328# * returns paramater list as tied hash ref
329# * we can edit the values by changing the key
330# * multivalued CGI paramaters are returned as a packaged string separated by "\0" (null)
331122µs1477µsmy $params = $cgi->Vars;
# spent 477µs making 1 call to CGI::AUTOLOAD
3321600nsmy $tag;
333118µs1315µs$tag = $params->{tag} if $params->{tag};
# spent 315µs making 1 call to CGI::AUTOLOAD
334
335
336# String with params with the search criteria for the paging in opac-detail
33712µsmy $pasarParams = '';
33811µsmy $j = 0;
3391144µs2333µsfor (keys %$params) {
# spent 333µs making 2 calls to CGI::AUTOLOAD, avg 166µs/call
34027µs117µs my @pasarParam = $cgi->param($_);
# spent 17µs making 1 call to CGI::param
341 for my $paramValue(@pasarParam) {
34233µs $pasarParams .= '&amp;' if ($j > 0);
343 $pasarParams .= $_ . '=' . $paramValue;
344 $j++;
345 }
346}
347
348# Params that can have more than one value
349# sort by is used to sort the query
350# in theory can have more than one but generally there's just one
3511300nsmy @sort_by;
3521400nsmy $default_sort_by;
3531110µs44.44msif ( C4::Context->preference('OPACdefaultSortField')
# spent 4.44ms making 4 calls to C4::Context::preference, avg 1.11ms/call
354 && C4::Context->preference('OPACdefaultSortOrder') ) {
355 $default_sort_by =
356 C4::Context->preference('OPACdefaultSortField') . '_'
357 . C4::Context->preference('OPACdefaultSortOrder');
358}
359
36016µsmy @allowed_sortby = qw /acqdate_asc acqdate_dsc author_az author_za call_number_asc call_number_dsc popularity_asc popularity_dsc pubdate_asc pubdate_dsc relevance title_az title_za/;
36116µs132µs@sort_by = $cgi->param('sort_by');
# spent 32µs making 1 call to CGI::param
36211µs$sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
36313µsforeach my $sort (@sort_by) {
36417µs if ( $sort ~~ @allowed_sortby ) {
365 $template->param($sort => 1);
366 }
367}
368111µs114µs$template->param('sort_by' => $sort_by[0]);
# spent 14µs making 1 call to C4::Templates::param
369
370# Use the servers defined, or just search our local catalog(default)
37113µs110µsmy @servers = $cgi->param('server');
# spent 10µs making 1 call to CGI::param
37212µsunless (@servers) {
373 #FIXME: this should be handled using Context.pm
374 @servers = ("biblioserver");
375 # @servers = C4::Context->config("biblioserver");
376}
377
378# operators include boolean and proximity operators and are used
379# to evaluate multiple operands
38012µs18µsmy @operators = $cgi->param('op');
# spent 8µs making 1 call to CGI::param
38112µs@operators = map { uri_unescape($_) } @operators;
382
383# indexes are query qualifiers, like 'title', 'author', etc. They
384# can be single or multiple parameters separated by comma: kw,right-Truncation
38513µs18µsmy @indexes = $cgi->param('idx');
# spent 8µs making 1 call to CGI::param
38611µs@indexes = map { uri_unescape($_) } @indexes;
387
388# if a simple index (only one) display the index used in the top search box
3891700nsif ($indexes[0] && !$indexes[1]) {
390 $template->param("ms_".$indexes[0] => 1);
391}
392# an operand can be a single term, a phrase, or a complete ccl query
39312µs113µsmy @operands = $cgi->param('q');
# spent 13µs making 1 call to CGI::param
394210µs120µs@operands = map { uri_unescape($_) } @operands;
# spent 20µs making 1 call to URI::Escape::uri_unescape
395
39614µs$template->{VARS}->{querystring} = join(' ', @operands);
397
398# if a simple search, display the value in the search box
399413µsif ($operands[0] && !$operands[1]) {
400 my $ms_query = $operands[0];
4011900ns $ms_query =~ s/ #\S+//;
# spent 900ns making 1 call to main::CORE:subst
40215µs $template->param(ms_value => $ms_query);
# spent 5µs making 1 call to C4::Templates::param
403}
404
405# limits are use to limit to results to a pre-defined category such as branch or language
40613µs111µsmy @limits = $cgi->param('limit');
# spent 11µs making 1 call to CGI::param
4071900ns@limits = map { uri_unescape($_) } @limits;
408
409112µs115µsif($params->{'multibranchlimit'}) {
# spent 15µs making 1 call to CGI::FETCH
410 my $multibranch = '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')';
411 push @limits, $multibranch if ($multibranch ne '()');
412}
413
4141700nsmy $available;
41512µsforeach my $limit(@limits) {
416 if ($limit =~/available/) {
417 $available = 1;
418 }
419}
42012µs16µs$template->param(available => $available);
# spent 6µs making 1 call to C4::Templates::param
421
422# append year limits if they exist
42314µs111µsif ($params->{'limit-yr'}) {
# spent 11µs making 1 call to CGI::FETCH
424 if ($params->{'limit-yr'} =~ /\d{4}-\d{4}/) {
425 my ($yr1,$yr2) = split(/-/, $params->{'limit-yr'});
426 push @limits, "yr,st-numeric,ge=$yr1 and yr,st-numeric,le=$yr2";
427 }
428 elsif ($params->{'limit-yr'} =~ /\d{4}/) {
429 push @limits, "yr,st-numeric=$params->{'limit-yr'}";
430 }
431 else {
432 #FIXME: Should return a error to the user, incorect date format specified
433 }
434}
435
436# Params that can only have one value
43714µs110µsmy $scan = $params->{'scan'};
# spent 10µs making 1 call to CGI::FETCH
43814µs12.23msmy $count = C4::Context->preference('OPACnumSearchResults') || 20;
# spent 2.23ms making 1 call to C4::Context::preference
43917µs12.09msmy $countRSS = C4::Context->preference('numSearchRSSResults') || 50;
# spent 2.09ms making 1 call to C4::Context::preference
440120µs151µsmy $results_per_page = $params->{'count'} || $count;
# spent 51µs making 1 call to CGI::FETCH
44116µs113µsmy $offset = $params->{'offset'} || 0;
# spent 13µs making 1 call to CGI::FETCH
44212µs19µsmy $page = $cgi->param('page') || 1;
# spent 9µs making 1 call to CGI::param
4431700ns$offset = ($page-1)*$results_per_page if $page>1;
4441400nsmy $hits;
44515µs112µsmy $expanded_facet = $params->{'expand'};
# spent 12µs making 1 call to CGI::FETCH
446
447# Define some global variables
44811µsmy ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type);
449
4501400nsmy @results;
451
452## I. BUILD THE QUERY
453116µs137.8ms( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by, 0, $lang);
# spent 37.8ms making 1 call to C4::Search::buildQuery
454
455
# spent 188µs (61+127) within main::_input_cgi_parse which was called: # once (61µs+127µs) by main::RUNTIME at line 466
sub _input_cgi_parse {
456315µs my @elements;
457 for my $this_cgi ( split('&',shift) ) {
4586177µs next unless $this_cgi;
4592127µs $this_cgi =~ /(.*?)=(.*)/;
# spent 127µs making 2 calls to main::CORE:match, avg 63µs/call
460 push @elements, { input_name => $1, input_value => $2 };
461 }
462 return @elements;
463}
464
465## parse the query_cgi string and put it into a form suitable for <input>s
46617µs1188µsmy @query_inputs = _input_cgi_parse($query_cgi);
# spent 188µs making 1 call to main::_input_cgi_parse
467113µs128µs$template->param ( QUERY_INPUTS => \@query_inputs );
# spent 28µs making 1 call to C4::Templates::param
468
469## parse the limit_cgi string and put it into a form suitable for <input>s
47013µsmy @limit_inputs = $limit_cgi ? _input_cgi_parse($limit_cgi) : ();
471
472# add OPAC 'hidelostitems'
473#if (C4::Context->preference('hidelostitems') == 1) {
474# # either lost ge 0 or no value in the lost register
475# $query ="($query) and ( (lost,st-numeric <= 0) or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='') )";
476#}
477#
478# add OPAC suppression - requires at least one item indexed with Suppress
479216µs12.17msif (C4::Context->preference('OpacSuppression')) {
# spent 2.17ms making 1 call to C4::Context::preference
480 # OPAC suppression by IP address
48114µs11.85ms if (C4::Context->preference('OpacSuppressionByIPRange')) {
# spent 1.85ms making 1 call to C4::Context::preference
482 my $IPAddress = $ENV{'REMOTE_ADDR'};
483 my $IPRange = C4::Context->preference('OpacSuppressionByIPRange');
484 if ($IPAddress !~ /^$IPRange/) {
485 $query = "($query) not Suppress=1";
486 }
487 }
488 else {
489 $query = "($query) not Suppress=1";
490 }
491}
492
49318µs114µs$template->param ( LIMIT_INPUTS => \@limit_inputs );
# spent 14µs making 1 call to C4::Templates::param
494110µs21.80ms$template->param ( OPACResultsSidebar => C4::Context->preference('OPACResultsSidebar'));
# spent 1.78ms making 1 call to C4::Context::preference # spent 16µs making 1 call to C4::Templates::param
495
496## II. DO THE SEARCH AND GET THE RESULTS
49711µsmy $total = 0; # the total results for the whole set
4981500nsmy $facets; # this object stores the faceted results that display on the left-hand of the results page
4991500nsmy @results_array;
5001500nsmy $results_hashref;
5011500nsmy @coins;
502
503611µsif ($tag) {
504 $query_cgi = "tag=" .$tag . "&" . $query_cgi;
505 my $taglist = get_tags({term=>$tag, approved=>1});
506 $results_hashref->{biblioserver}->{hits} = scalar (@$taglist);
507 my @biblist = (map {GetBiblioData($_->{biblionumber})} @$taglist);
508 my @marclist = (map {$_->{marc}} @biblist );
509 $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist);
510 $results_hashref->{biblioserver}->{RECORDS} = \@marclist;
511 # FIXME: tag search and standard search should work together, not exclusively
512 # FIXME: No facets for tags search.
513} elsif ($build_grouped_results) {
514 eval {
515 ($error, $results_hashref, $facets) = C4::Search::pazGetRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$query_type,$scan);
516 };
517} else {
518 $pasarParams .= '&amp;query=' . $query;
519 $pasarParams .= '&amp;count=' . $results_per_page;
520 $pasarParams .= '&amp;simple_query=' . $simple_query;
521 $pasarParams .= '&amp;query_type=' . $query_type if ($query_type);
522113µs eval {
5231143ms ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$query_type,$scan,1);
# spent 143ms making 1 call to C4::Search::getRecords
524 };
525}
526# This sorts the facets into alphabetical order
527323µsif ($facets) {
528 foreach my $f (@$facets) {
5295124µs576µs $f->{facets} = [ sort { uc($a->{facet_title_value}) cmp uc($b->{facet_title_value}) } @{ $f->{facets} } ];
# spent 76µs making 5 calls to main::CORE:sort, avg 15µs/call
530 }
53119µs @$facets = sort {$a->{expand} cmp $b->{expand}} @$facets;
# spent 9µs making 1 call to main::CORE:sort
532}
533
534# use Data::Dumper; print STDERR "-" x 25, "\n", Dumper($results_hashref);
53511µsif ($@ || $error) {
536 $template->param(query_error => $error.$@);
537 output_html_with_http_headers $cgi, $cookie, $template->output;
538 exit;
539}
540
541# At this point, each server has given us a result set
542# now we build that set for template display
5431800nsmy @sup_results_array;
544437µsfor (my $i=0;$i<@servers;$i++) {
545 my $server = $servers[$i];
5461473µs112µs if ($server && $server =~/biblioserver/) { # this is the local bibliographic server
# spent 12µs making 1 call to main::CORE:match
547 $hits = $results_hashref->{$server}->{"hits"};
548135µs my $page = $cgi->param('page') || 0;
# spent 35µs making 1 call to CGI::param
549 my @newresults;
550119µs if ($build_grouped_results) {
551 foreach my $group (@{ $results_hashref->{$server}->{"GROUPS"} }) {
552 # because pazGetRecords handles retieving only the records
553 # we want as specified by $offset and $results_per_page,
554 # we need to set the offset parameter of searchResults to 0
555 my @group_results = searchResults( 'opac', $query_desc, $group->{'group_count'},$results_per_page, 0, $scan,
556 $group->{"RECORDS"});
557 push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results };
558 }
559 } else {
56074.40s @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan,
# spent 4.40s making 1 call to C4::Search::searchResults # spent 38µs making 4 calls to DBI::common::DESTROY, avg 9µs/call # spent 10µs making 2 calls to DBD::_mem::common::DESTROY, avg 5µs/call
561 $results_hashref->{$server}->{"RECORDS"});
562 }
563
564 # must define a value for size if not present in DB
565 # in order to avoid problems generated by the default size value in TT
566 foreach my $line (@newresults) {
5675054µs if ( not exists $line->{'size'} ) { $line->{'size'} = "" }
568 # while we're checking each line, see if item is in the cart
569 if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) {
570 $line->{'incart'} = 1;
571 }
572 }
573
574
575 my $tag_quantity;
57613µs211µs if (C4::Context->preference('TagsEnabled') and
# spent 11µs making 2 calls to C4::Context::preference, avg 6µs/call
577 $tag_quantity = C4::Context->preference('TagsShowOnList')) {
578 foreach (@newresults) {
57975903µs my $bibnum = $_->{biblionumber} or next;
58010066.3ms $_->{itemsissued} = CountItemsIssued( $bibnum );
# spent 65.8ms making 25 calls to C4::Biblio::CountItemsIssued, avg 2.63ms/call # spent 460µs making 50 calls to DBI::common::DESTROY, avg 9µs/call # spent 93µs making 25 calls to DBD::_mem::common::DESTROY, avg 4µs/call
58110074.9ms $_ ->{'TagLoop'} = get_tags({biblionumber=>$bibnum, approved=>1, 'sort'=>'-weight',
# spent 74.6ms making 25 calls to C4::Tags::get_tags, avg 2.98ms/call # spent 274µs making 50 calls to DBI::common::DESTROY, avg 5µs/call # spent 67µs making 25 calls to DBD::_mem::common::DESTROY, avg 3µs/call
582 limit=>$tag_quantity });
583 }
584 }
585
58615µs169µs if (C4::Context->preference('COinSinOPACResults')) {
# spent 69µs making 1 call to C4::Context::preference
587 foreach (@newresults) {
588751.51ms100580ms my $record = GetMarcBiblio($_->{'biblionumber'});
# spent 579ms making 25 calls to C4::Biblio::GetMarcBiblio, avg 23.1ms/call # spent 914µs making 50 calls to DBI::common::DESTROY, avg 18µs/call # spent 103µs making 25 calls to DBD::_mem::common::DESTROY, avg 4µs/call
5892534.9ms $_->{coins} = GetCOinSBiblio($record);
# spent 34.9ms making 25 calls to C4::Biblio::GetCOinSBiblio, avg 1.40ms/call
590252.80ms if ( C4::Context->preference( "Babeltheque" ) and $_->{normalized_isbn} ) {
# spent 2.80ms making 25 calls to C4::Context::preference, avg 112µs/call
591 my $isbn = Business::ISBN->new( $_->{normalized_isbn} );
592 next if not $isbn;
593 $isbn = $isbn->as_isbn13->as_string;
594 $isbn =~ s/-//g;
595 my $social_datas = C4::SocialData::get_data( $isbn );
596 next if not $social_datas;
597 for my $key ( keys %$social_datas ) {
598 $_->{$key} = $$social_datas{$key};
599 if ( $key eq 'score_avg' ){
600 $_->{score_int} = sprintf("%.0f", $$social_datas{score_avg} );
601 }
602 }
603 }
604 }
605 }
606
607
60818µs if ( C4::Context->preference('OpacStarRatings') eq 'all' ) {
# spent 8µs making 1 call to C4::Context::preference
609 foreach my $res (@newresults) {
610 my $rating = GetRating( $res->{'biblionumber'}, $borrowernumber );
611 $res->{'rating_value'} = $rating->{'rating_value'};
612 $res->{'rating_total'} = $rating->{'rating_total'};
613 $res->{'rating_avg'} = $rating->{'rating_avg'};
614 $res->{'rating_avg_int'} = $rating->{'rating_avg_int'};
615 }
616 }
617
618 if ($results_hashref->{$server}->{"hits"}){
619 $total = $total + $results_hashref->{$server}->{"hits"};
620 }
621
622 # Opac search history
623 my $newsearchcookie;
6247147µs18µs if (C4::Context->preference('EnableOpacSearchHistory')) {
# spent 8µs making 1 call to C4::Context::preference
6251168µs my @recentSearches = ParseSearchHistoryCookie($cgi);
# spent 168µs making 1 call to C4::Auth::ParseSearchHistoryCookie
626
627 # Adding the new search if needed
6281933µs my $path_info = $cgi->url(-path_info=>1);
# spent 933µs making 1 call to CGI::AUTOLOAD
6291649µs my $query_cgi_history = $cgi->url(-query=>1);
# spent 649µs making 1 call to CGI::url
630220µs $query_cgi_history =~ s/^$path_info\?//;
# spent 15µs making 1 call to main::CORE:regcomp # spent 5µs making 1 call to main::CORE:subst
63112µs $query_cgi_history =~ s/;/&/g;
# spent 2µs making 1 call to main::CORE:subst
632 my $query_desc_history = "$query_desc, $limit_desc";
633
634438µs if (!$borrowernumber || $borrowernumber eq '') {
635 # To a cookie (the user is not logged in)
636237µs if (!$offset) {
6372185µs push @recentSearches, {
# spent 185µs making 2 calls to Encode::decode_utf8, avg 92µs/call
638 "query_desc" => Encode::decode_utf8($query_desc) || "unknown",
639 "query_cgi" => Encode::decode_utf8($query_cgi) || "unknown",
640 "time" => time(),
641 "total" => $total
642 };
643121µs $template->param(ShowOpacRecentSearchLink => 1);
# spent 21µs making 1 call to C4::Templates::param
644 }
645
646 shift @recentSearches if (@recentSearches > 15);
647 # Pushing the cookie back
64831.48ms $newsearchcookie = $cgi->cookie(
# spent 890µs making 1 call to JSON::PP::encode_json # spent 370µs making 1 call to CGI::cookie # spent 218µs making 1 call to URI::Escape::uri_escape
649 -name => 'KohaOpacRecentSearches',
650 # We uri_escape the whole serialized structure so we're sure we won't have any encoding problems
651 -value => uri_escape( encode_json(\@recentSearches) ),
652 -expires => ''
653 );
654 $cookie = [$cookie, $newsearchcookie];
655 }
656 else {
657 # To the session (the user is logged in)
658 if (!$offset) {
659 AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc_history, $query_cgi_history, $total);
660 $template->param(ShowOpacRecentSearchLink => 1);
661 }
662 }
663 }
664 ## If there's just one result, redirect to the detail page
665 if ($total == 1 && $format ne 'rss2'
666 && $format ne 'opensearchdescription' && $format ne 'atom') {
667 my $biblionumber=$newresults[0]->{biblionumber};
668 if (C4::Context->preference('BiblioDefaultView') eq 'isbd') {
669 print $cgi->redirect("/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=$biblionumber");
670 } elsif (C4::Context->preference('BiblioDefaultView') eq 'marc') {
671 print $cgi->redirect("/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=$biblionumber");
672 } else {
673 print $cgi->redirect("/cgi-bin/koha/opac-detail.pl?biblionumber=$biblionumber");
674 }
675 exit;
676 }
67732207µs if ($hits) {
678643µs if ( !$build_grouped_results ) {
679 # We build the encrypted list of first OPACnumSearchResults biblios to pass with the search criteria for paging on opac-detail
680 $pasarParams .= '&amp;listBiblios=';
681 my $j = 0;
682 foreach (@newresults) {
683100126µs my $bibnum = ($_->{biblionumber})?$_->{biblionumber}:0;
684 $pasarParams .= $bibnum . ',';
685 $j++;
686 last if ($j == $results_per_page);
687 }
68818µs chop $pasarParams if ($pasarParams =~ /,$/);
# spent 8µs making 1 call to main::CORE:match
68913µs $pasarParams .= '&amp;total=' . int($total) if ($pasarParams !~ /total=(?:[0-9]+)?/);
# spent 3µs making 1 call to main::CORE:match
690294µs36.66ms if ($pasarParams) {
# spent 5.75ms making 1 call to CGI::Session::DESTROY # spent 896µs making 1 call to CGI::Session::Driver::DBI::DESTROY # spent 10µs making 1 call to CGI::DESTROY
69122.69ms my $session = get_session($cgi->cookie("CGISESSID"));
# spent 2.61ms making 1 call to C4::Auth::get_session # spent 84µs making 1 call to CGI::cookie
692163µs $session->param('busc' => $pasarParams);
# spent 63µs making 1 call to CGI::Session::param
693 }
694 #
695 }
696135µs $template->param(total => $hits);
# spent 35µs making 1 call to C4::Templates::param
697 my $limit_cgi_not_availablity = $limit_cgi;
698 $limit_cgi_not_availablity =~ s/&limit=available//g if defined $limit_cgi_not_availablity;
699110µs $template->param(limit_cgi_not_availablity => $limit_cgi_not_availablity);
# spent 10µs making 1 call to C4::Templates::param
70018µs $template->param(limit_cgi => $limit_cgi);
# spent 8µs making 1 call to C4::Templates::param
701131µs $template->param(countrss => $countRSS );
# spent 31µs making 1 call to C4::Templates::param
702110µs $template->param(query_cgi => $query_cgi);
# spent 10µs making 1 call to C4::Templates::param
703110µs $template->param(query_desc => $query_desc);
# spent 10µs making 1 call to C4::Templates::param
70418µs $template->param(limit_desc => $limit_desc);
# spent 8µs making 1 call to C4::Templates::param
70518µs $template->param(offset => $offset);
# spent 8µs making 1 call to C4::Templates::param
706110µs $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold);
# spent 10µs making 1 call to C4::Templates::param
70718µs if ($query_desc || $limit_desc) {
# spent 8µs making 1 call to C4::Templates::param
708 $template->param(searchdesc => 1);
709 }
710 $template->param(stopwords_removed => "@$stopwords_removed") if $stopwords_removed;
71119µs $template->param(results_per_page => $results_per_page);
# spent 9µs making 1 call to C4::Templates::param
712114µs my $hide = C4::Context->preference('OpacHiddenItems');
# spent 14µs making 1 call to C4::Context::preference
713 $hide = ($hide =~ m/\S/) if $hide; # Just in case it has some spaces/new lines
714 my $branch = '';
715114µs if (C4::Context->userenv){
# spent 14µs making 1 call to C4::Context::userenv
716 $branch = C4::Context->userenv->{branch};
717 }
71811.98ms if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) {
# spent 1.98ms making 1 call to C4::Context::preference
719 if (
720 ( ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) && $branch )
721 ||
722 C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch'
723 ) {
724 my $branchname;
725 if ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) {
726 $branchname = $branches->{$branch}->{'branchname'};
727 }
728 elsif ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'OpacURLBranch' ) {
729 $branchname = $branches->{ $ENV{'BRANCHCODE'} }->{'branchname'};
730 }
731
732 foreach my $res ( @newresults ) {
733 my @new_loop;
734 my @top_loop;
735 my @old_loop = @{$res->{'available_items_loop'}};
736 foreach my $item ( @old_loop ) {
737 if ( $item->{'branchname'} eq $branchname ) {
738 $item->{'this_branch'} = 1;
739 push( @top_loop, $item );
740 } else {
741 push( @new_loop, $item );
742 }
743 }
744 my @complete_loop = ( @top_loop, @new_loop );
745 $res->{'available_items_loop'} = \@complete_loop;
746 }
747 }
748 }
749
750 $template->param(
75122.46ms SEARCH_RESULTS => \@newresults,
# spent 2.43ms making 1 call to C4::Context::preference # spent 37µs making 1 call to C4::Templates::param
752 OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay")),
753 suppress_result_number => $hide,
754 );
755219µs110µs if (C4::Context->preference("OPACLocalCoverImages")){
# spent 10µs making 1 call to C4::Context::preference
75618µs $template->param(OPACLocalCoverImages => 1);
# spent 8µs making 1 call to C4::Templates::param
75721.90ms $template->param(OPACLocalCoverImagesPriority => C4::Context->preference("OPACLocalCoverImagesPriority"));
# spent 1.87ms making 1 call to C4::Context::preference # spent 24µs making 1 call to C4::Templates::param
758 }
759 ## Build the page numbers on the bottom of the page
760 my @page_numbers;
761 # total number of pages there will be
762141µs my $pages = ceil($hits / $results_per_page);
# spent 41µs making 1 call to POSIX::ceil
763 # default page number
764 my $current_page_number = 1;
765 if ($offset) {
766 $current_page_number = ( $offset / $results_per_page + 1 );
767 }
768 my $previous_page_offset;
769 if ( $offset >= $results_per_page ) {
770 $previous_page_offset = $offset - $results_per_page;
771 }
772 my $next_page_offset = $offset + $results_per_page;
773 # If we're within the first 10 pages, keep it simple
774 #warn "current page:".$current_page_number;
775420µs if ($current_page_number < 10) {
776 # just show the first 10 pages
777 # Loop through the pages
778 my $pages_to_show = 10;
779 $pages_to_show = $pages if $pages<10;
7803083µs for ($i=1; $i<=$pages_to_show;$i++) {
781 # the offset for this page
782 my $this_offset = (($i*$results_per_page)-$results_per_page);
783 # the page number for this page
784 my $this_page_number = $i;
785 # put it in the array
786 push @page_numbers,
787 { offset => $this_offset,
788 pg => $this_page_number,
789 highlight => $this_page_number == $current_page_number,
790 sort_by => join ' ', @sort_by
791 };
792
793 }
794
795 }
796 # now, show twenty pages, with the current one smack in the middle
797 else {
798 for ($i=$current_page_number; $i<=($current_page_number + 20 );$i++) {
799 my $this_offset = ((($i-9)*$results_per_page)-$results_per_page);
800 my $this_page_number = $i-9;
801 if ( $this_page_number <= $pages ) {
802 push @page_numbers,
803 { offset => $this_offset,
804 pg => $this_page_number,
805 highlight => $this_page_number == $current_page_number,
806 sort_by => join ' ', @sort_by
807 };
808 }
809 }
810
811 }
812121µs $template->param( PAGE_NUMBERS => \@page_numbers,
# spent 21µs making 1 call to C4::Templates::param
813 previous_page_offset => $previous_page_offset) unless $pages < 2;
81419µs $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
# spent 9µs making 1 call to C4::Templates::param
815 }
816 # no hits
817 else {
818 my $nohits = C4::Context->preference('OPACNoResultsFound');
819 if ($nohits and $nohits=~/{QUERY_KW}/){
820 # extracting keywords in case of relaunching search
821 (my $query_kw=$query_desc)=~s/ and|or / /g;
822 $query_kw = Encode::decode_utf8($query_kw);
823 my @query_kw=($query_kw=~ /([-\w]+\b)(?:[^,:]|$)/g);
824 $query_kw=join('+',@query_kw);
825 $nohits=~s/{QUERY_KW}/$query_kw/g;
826 $template->param('OPACNoResultsFound' =>$nohits);
827 }
828 $template->param(
829 searchdesc => 1,
830 query_desc => $query_desc,
831 limit_desc => $limit_desc,
832 query_cgi => $query_cgi,
833 limit_cgi => $limit_cgi
834 );
835 }
836 } # end of the if local
837 # asynchronously search the authority server
838 elsif ($server && $server =~/authorityserver/) { # this is the local authority server
839 my @inner_sup_results_array;
840 for my $sup_record ( @{$results_hashref->{$server}->{"RECORDS"}} ) {
841 my $marc_record_object = MARC::Record->new_from_usmarc($sup_record);
842 my $title_field = $marc_record_object->field(100);
843 push @inner_sup_results_array, {
844 'title' => $title_field->subfield('a'),
845 'link' => "&amp;idx=an&amp;q=".$marc_record_object->field('001')->as_string(),
846 };
847 }
848 my $servername = $server;
849 push @sup_results_array, { servername => $servername,
850 inner_sup_results_loop => \@inner_sup_results_array} if @inner_sup_results_array;
851 }
852 # FIXME: can add support for other targets as needed here
853113µs $template->param( outer_sup_results_loop => \@sup_results_array);
# spent 13µs making 1 call to C4::Templates::param
85411µs} #/end of the for loop
855#$template->param(FEDERATED_RESULTS => \@results_array);
856
857122µs22.38ms$template->param(
# spent 2.33ms making 1 call to C4::Context::preference # spent 48µs making 1 call to C4::Templates::param
858 #classlist => $classlist,
859 total => $total,
860 opacfacets => 1,
861 facets_loop => $facets,
862 displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
863 scan => $scan,
864 search_error => $error,
865);
866
86716µs19µsif ($query_desc || $limit_desc) {
# spent 9µs making 1 call to C4::Templates::param
868 $template->param(searchdesc => 1);
869}
870
871# VI. BUILD THE TEMPLATE
872# Build drop-down list for 'Add To:' menu...
873111µs11.22msmy ($totalref, $pubshelves, $barshelves)=
# spent 1.22ms making 1 call to C4::VirtualShelves::GetSomeShelfNames
874 C4::VirtualShelves::GetSomeShelfNames($borrowernumber,'COMBO',1);
875110µs127µs$template->param(
# spent 27µs making 1 call to C4::Templates::param
876 addbarshelves => $totalref->{bartotal},
877 addbarshelvesloop => $barshelves,
878 addpubshelves => $totalref->{pubtotal},
879 addpubshelvesloop => $pubshelves,
880 );
881
88212µsmy $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html';
883
884# If GoogleIndicTransliteration system preference is On Set paramter to load Google's javascript in OPAC search screens
88518µs12.67msif (C4::Context->preference('GoogleIndicTransliteration')) {
# spent 2.67ms making 1 call to C4::Context::preference
886 $template->param('GoogleIndicTransliteration' => 1);
887}
888118µs12.58ms$template->{VARS}->{'BiblioItemtypeImage'} = C4::Context->preference('BiblioItemtypeImage');
# spent 2.58ms making 1 call to C4::Context::preference
889
890116µs11.93ms$template->{VARS}->{DidYouMean} =
# spent 1.93ms making 1 call to C4::Context::preference
891 ( defined C4::Context->preference('OPACdidyoumean')
892 && C4::Context->preference('OPACdidyoumean') =~ m/enable/ );
893113µs11.90ms$template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews');
# spent 1.90ms making 1 call to C4::Context::preference
894115µs11.84ms$template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer');
# spent 1.84ms making 1 call to C4::Context::preference
895116µs12.15ms$template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults');
# spent 2.15ms making 1 call to C4::Context::preference
896
897110µs120µs $template->param( borrowernumber => $borrowernumber);
# spent 20µs making 1 call to C4::Templates::param
89811.07ms2748msoutput_with_http_headers $cgi, $cookie, $template->output, $content_type;
# spent 720ms making 1 call to C4::Templates::output # spent 27.3ms making 1 call to C4::Output::output_with_http_headers
 
# spent 16µs within B::SV::FLAGS which was called 4 times, avg 4µs/call: # 4 times (16µs+0s) by JSON::PP::value_to_json at line 432 of JSON/PP.pm, avg 4µs/call
sub B::SV::FLAGS; # xsub
# spent 5.49ms within DBD::_mem::common::DESTROY which was called 1653 times, avg 3µs/call: # 174 times (485µs+0s) by C4::Biblio::GetAuthorisedValueDesc at line 92 of /usr/share/koha/lib/C4/XSLT.pm, avg 3µs/call # 161 times (516µs+0s) by C4::Context::preference at line 559 of /usr/share/koha/lib/C4/Context.pm, avg 3µs/call # 114 times (288µs+0s) by C4::Languages::getAllLanguages at line 194 of /usr/share/koha/lib/C4/Languages.pm, avg 3µs/call # 96 times (332µs+0s) by C4::Items::GetItemsInfo at line 1246 of /usr/share/koha/lib/C4/Items.pm, avg 3µs/call # 75 times (358µs+0s) by C4::Items::GetItemsInfo at line 248 of /usr/share/koha/lib/C4/XSLT.pm, avg 5µs/call # 64 times (239µs+0s) by C4::Branch::GetBranchName at line 1580 of /usr/share/koha/lib/C4/Biblio.pm, avg 4µs/call # 57 times (305µs+0s) by C4::Koha::getitemtypeinfo at line 1585 of /usr/share/koha/lib/C4/Biblio.pm, avg 5µs/call # 51 times (192µs+0s) by C4::Koha::GetAuthValCode at line 1169 of /usr/share/koha/lib/C4/Koha.pm, avg 4µs/call # 50 times (246µs+0s) by C4::Branch::GetBranches at line 257 of /usr/share/koha/lib/C4/XSLT.pm, avg 5µs/call # 50 times (173µs+0s) by C4::Biblio::GetFrameworkCode or C4::Koha::GetKohaAuthorisedValues at line 254 of /usr/share/koha/lib/C4/XSLT.pm, avg 3µs/call # 50 times (149µs+0s) by C4::Biblio::GetFrameworkCode or C4::Koha::GetKohaAuthorisedValues at line 255 of /usr/share/koha/lib/C4/XSLT.pm, avg 3µs/call # 47 times (143µs+0s) by C4::Koha::GetAuthValCode or C4::Koha::GetKohaAuthorisedValueLib at line 1292 of /usr/share/koha/lib/C4/Items.pm, avg 3µs/call # 32 times (126µs+0s) by C4::Koha::GetAuthValCode at line 1280 of /usr/share/koha/lib/C4/Items.pm, avg 4µs/call # 32 times (114µs+0s) by C4::Koha::GetAuthValCode at line 1286 of /usr/share/koha/lib/C4/Items.pm, avg 4µs/call # 32 times (113µs+0s) by C4::Circulation::GetTransfers at line 1925 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # 32 times (105µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1281 of /usr/share/koha/lib/C4/Items.pm, avg 3µs/call # 32 times (100µs+0s) by C4::Reserves::GetReserveStatus at line 761 of /usr/share/koha/lib/C4/Reserves.pm, avg 3µs/call # 32 times (97µs+0s) by C4::Reserves::GetReserveStatus at line 267 of /usr/share/koha/lib/C4/XSLT.pm, avg 3µs/call # 32 times (90µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1287 of /usr/share/koha/lib/C4/Items.pm, avg 3µs/call # 32 times (86µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1282 of /usr/share/koha/lib/C4/Items.pm, avg 3µs/call # 32 times (84µs+0s) by C4::Circulation::GetTransfers at line 265 of /usr/share/koha/lib/C4/XSLT.pm, avg 3µs/call # 32 times (83µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1288 of /usr/share/koha/lib/C4/Items.pm, avg 3µs/call # 32 times (79µs+0s) by C4::Reserves::GetReserveStatus at line 1926 of /usr/share/koha/lib/C4/Search.pm, avg 2µs/call # 27 times (65µs+0s) by C4::Languages::language_get_description at line 360 of /usr/share/koha/lib/C4/Languages.pm, avg 2µs/call # 25 times (103µs+0s) by C4::Biblio::GetMarcBiblio at line 588, avg 4µs/call # 25 times (102µs+0s) by C4::Biblio::GetFrameworkCode at line 1702 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # 25 times (94µs+0s) by C4::Biblio::GetFrameworkCode at line 77 of /usr/share/koha/lib/C4/XSLT.pm, avg 4µs/call # 25 times (93µs+0s) by C4::Biblio::CountItemsIssued at line 580, avg 4µs/call # 25 times (88µs+0s) by C4::Koha::GetItemTypes at line 258 of /usr/share/koha/lib/C4/XSLT.pm, avg 4µs/call # 25 times (76µs+0s) by C4::Biblio::GetRecordValue at line 1708 of /usr/share/koha/lib/C4/Search.pm, avg 3µs/call # 25 times (67µs+0s) by C4::Tags::get_tags at line 581, avg 3µs/call # 25 times (66µs+0s) by C4::Biblio::GetRecordValue at line 1709 of /usr/share/koha/lib/C4/Search.pm, avg 3µs/call # 25 times (63µs+0s) by C4::Biblio::GetRecordValue at line 1710 of /usr/share/koha/lib/C4/Search.pm, avg 3µs/call # 7 times (17µs+0s) by C4::Languages::language_get_description at line 318 of /usr/share/koha/lib/C4/Languages.pm, avg 2µs/call # 7 times (15µs+0s) by C4::Languages::language_get_description at line 320 of /usr/share/koha/lib/C4/Languages.pm, avg 2µs/call # 7 times (13µs+0s) by C4::Languages::language_get_description at line 319 of /usr/share/koha/lib/C4/Languages.pm, avg 2µs/call # 7 times (13µs+0s) by C4::Languages::language_get_description at line 321 of /usr/share/koha/lib/C4/Languages.pm, avg 2µs/call # 5 times (14µs+0s) by C4::Languages::language_get_description at line 334 of /usr/share/koha/lib/C4/Languages.pm, avg 3µs/call # 3 times (18µs+0s) by C4::Biblio::GetMarcStructure at line 78 of /usr/share/koha/lib/C4/XSLT.pm, avg 6µs/call # 3 times (14µs+0s) by C4::Biblio::GetMarcStructure at line 1118 of /usr/share/koha/lib/C4/Biblio.pm, avg 5µs/call # 3 times (12µs+0s) by C4::XSLT::getAuthorisedValues4MARCSubfields at line 120 of /usr/share/koha/lib/C4/XSLT.pm, avg 4µs/call # 2 times (10µs+0s) by C4::Search::searchResults at line 560, avg 5µs/call # 2 times (5µs+0s) by C4::Koha::GetAuthorisedValues at line 247 of Memoize.pm, avg 3µs/call # 2 times (5µs+0s) by C4::Branch::GetBranches at line 161 of /usr/share/koha/lib/C4/Branch.pm, avg 2µs/call # 2 times (5µs+0s) by C4::Branch::GetBranches at line 195, avg 2µs/call # once (5µs+0s) by C4::Context::_new_marcfromkohafield at line 1010 of /usr/share/koha/lib/C4/Context.pm # once (5µs+0s) by C4::Koha::GetItemTypes at line 205 # once (3µs+0s) by C4::Branch::GetBranchCategories at line 381 of /usr/share/koha/lib/C4/Auth.pm # once (3µs+0s) by DBD::_::db::selectall_arrayref at line 197 of /usr/share/koha/lib/C4/VirtualShelves.pm # once (3µs+0s) by C4::Branch::GetBranchesCount at line 786 of /usr/share/koha/lib/C4/Koha.pm # once (3µs+0s) by C4::Search::searchResults at line 1666 of /usr/share/koha/lib/C4/Search.pm # once (2µs+0s) by C4::Languages::getAllLanguages at line 201 # once (2µs+0s) by C4::Koha::GetAuthValCode at line 1657 of /usr/share/koha/lib/C4/Search.pm # once (2µs+0s) by C4::Koha::GetKohaAuthorisedValues at line 1654 of /usr/share/koha/lib/C4/Search.pm # once (2µs+0s) by C4::Branch::GetBranchCategories at line 196
sub DBD::_mem::common::DESTROY; # xsub
# spent 5µs within DBI::Const::GetInfo::ANSI::CORE:match which was called: # once (5µs+0s) by DBI::Const::GetInfoType::BEGIN@45 at line 41 of DBI/Const/GetInfo/ANSI.pm
sub DBI::Const::GetInfo::ANSI::CORE:match; # opcode
# spent 8µs within DBI::Const::GetInfo::ODBC::CORE:match which was called: # once (8µs+0s) by DBI::Const::GetInfoType::BEGIN@46 at line 38 of DBI/Const/GetInfo/ODBC.pm
sub DBI::Const::GetInfo::ODBC::CORE:match; # opcode
# spent 20.8ms within DBI::common::DESTROY which was called 3306 times, avg 6µs/call: # 348 times (1.87ms+0s) by C4::Biblio::GetAuthorisedValueDesc at line 92 of /usr/share/koha/lib/C4/XSLT.pm, avg 5µs/call # 322 times (1.81ms+0s) by C4::Context::preference at line 559 of /usr/share/koha/lib/C4/Context.pm, avg 6µs/call # 228 times (808µs+0s) by C4::Languages::getAllLanguages at line 194 of /usr/share/koha/lib/C4/Languages.pm, avg 4µs/call # 192 times (1.47ms+0s) by C4::Items::GetItemsInfo at line 1246 of /usr/share/koha/lib/C4/Items.pm, avg 8µs/call # 150 times (1.19ms+0s) by C4::Items::GetItemsInfo at line 248 of /usr/share/koha/lib/C4/XSLT.pm, avg 8µs/call # 128 times (693µs+0s) by C4::Branch::GetBranchName at line 1580 of /usr/share/koha/lib/C4/Biblio.pm, avg 5µs/call # 114 times (1.18ms+0s) by C4::Koha::getitemtypeinfo at line 1585 of /usr/share/koha/lib/C4/Biblio.pm, avg 10µs/call # 102 times (672µs+0s) by C4::Koha::GetAuthValCode at line 1169 of /usr/share/koha/lib/C4/Koha.pm, avg 7µs/call # 100 times (668µs+0s) by C4::Branch::GetBranches at line 257 of /usr/share/koha/lib/C4/XSLT.pm, avg 7µs/call # 100 times (638µs+0s) by C4::Biblio::GetFrameworkCode or C4::Koha::GetKohaAuthorisedValues at line 254 of /usr/share/koha/lib/C4/XSLT.pm, avg 6µs/call # 100 times (625µs+0s) by C4::Biblio::GetFrameworkCode or C4::Koha::GetKohaAuthorisedValues at line 255 of /usr/share/koha/lib/C4/XSLT.pm, avg 6µs/call # 94 times (578µs+0s) by C4::Koha::GetAuthValCode or C4::Koha::GetKohaAuthorisedValueLib at line 1292 of /usr/share/koha/lib/C4/Items.pm, avg 6µs/call # 64 times (522µs+0s) by C4::Koha::GetAuthValCode at line 1280 of /usr/share/koha/lib/C4/Items.pm, avg 8µs/call # 64 times (512µs+0s) by C4::Koha::GetAuthValCode at line 1286 of /usr/share/koha/lib/C4/Items.pm, avg 8µs/call # 64 times (400µs+0s) by C4::Reserves::GetReserveStatus at line 1926 of /usr/share/koha/lib/C4/Search.pm, avg 6µs/call # 64 times (389µs+0s) by C4::Circulation::GetTransfers at line 1925 of /usr/share/koha/lib/C4/Search.pm, avg 6µs/call # 64 times (370µs+0s) by C4::Reserves::GetReserveStatus at line 761 of /usr/share/koha/lib/C4/Reserves.pm, avg 6µs/call # 64 times (366µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1288 of /usr/share/koha/lib/C4/Items.pm, avg 6µs/call # 64 times (333µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1282 of /usr/share/koha/lib/C4/Items.pm, avg 5µs/call # 64 times (329µs+0s) by C4::Reserves::GetReserveStatus at line 267 of /usr/share/koha/lib/C4/XSLT.pm, avg 5µs/call # 64 times (327µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1287 of /usr/share/koha/lib/C4/Items.pm, avg 5µs/call # 64 times (296µs+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1281 of /usr/share/koha/lib/C4/Items.pm, avg 5µs/call # 64 times (276µs+0s) by C4::Circulation::GetTransfers at line 265 of /usr/share/koha/lib/C4/XSLT.pm, avg 4µs/call # 54 times (241µs+0s) by C4::Languages::language_get_description at line 360 of /usr/share/koha/lib/C4/Languages.pm, avg 4µs/call # 50 times (914µs+0s) by C4::Biblio::GetMarcBiblio at line 588, avg 18µs/call # 50 times (460µs+0s) by C4::Biblio::CountItemsIssued at line 580, avg 9µs/call # 50 times (407µs+0s) by C4::Biblio::GetFrameworkCode at line 77 of /usr/share/koha/lib/C4/XSLT.pm, avg 8µs/call # 50 times (385µs+0s) by C4::Biblio::GetFrameworkCode at line 1702 of /usr/share/koha/lib/C4/Search.pm, avg 8µs/call # 50 times (274µs+0s) by C4::Tags::get_tags at line 581, avg 5µs/call # 50 times (260µs+0s) by C4::Biblio::GetRecordValue at line 1709 of /usr/share/koha/lib/C4/Search.pm, avg 5µs/call # 50 times (257µs+0s) by C4::Koha::GetItemTypes at line 258 of /usr/share/koha/lib/C4/XSLT.pm, avg 5µs/call # 50 times (250µs+0s) by C4::Biblio::GetRecordValue at line 1708 of /usr/share/koha/lib/C4/Search.pm, avg 5µs/call # 50 times (229µs+0s) by C4::Biblio::GetRecordValue at line 1710 of /usr/share/koha/lib/C4/Search.pm, avg 5µs/call # 14 times (64µs+0s) by C4::Languages::language_get_description at line 318 of /usr/share/koha/lib/C4/Languages.pm, avg 5µs/call # 14 times (58µs+0s) by C4::Languages::language_get_description at line 320 of /usr/share/koha/lib/C4/Languages.pm, avg 4µs/call # 14 times (56µs+0s) by C4::Languages::language_get_description at line 319 of /usr/share/koha/lib/C4/Languages.pm, avg 4µs/call # 14 times (55µs+0s) by C4::Languages::language_get_description at line 321 of /usr/share/koha/lib/C4/Languages.pm, avg 4µs/call # 10 times (49µs+0s) by C4::Languages::language_get_description at line 334 of /usr/share/koha/lib/C4/Languages.pm, avg 5µs/call # 6 times (99µs+0s) by C4::Biblio::GetMarcStructure at line 78 of /usr/share/koha/lib/C4/XSLT.pm, avg 16µs/call # 6 times (65µs+0s) by C4::XSLT::getAuthorisedValues4MARCSubfields at line 120 of /usr/share/koha/lib/C4/XSLT.pm, avg 11µs/call # 6 times (34µs+0s) by C4::Biblio::GetMarcStructure at line 1118 of /usr/share/koha/lib/C4/Biblio.pm, avg 6µs/call # 4 times (38µs+0s) by C4::Search::searchResults at line 560, avg 9µs/call # 4 times (14µs+0s) by C4::Koha::GetAuthorisedValues at line 247 of Memoize.pm, avg 4µs/call # 4 times (14µs+0s) by C4::Branch::GetBranches at line 195, avg 3µs/call # 4 times (13µs+0s) by C4::Branch::GetBranches at line 161 of /usr/share/koha/lib/C4/Branch.pm, avg 3µs/call # 2 times (86µs+0s) by C4::Branch::GetBranchesCount at line 786 of /usr/share/koha/lib/C4/Koha.pm, avg 43µs/call # 2 times (23µs+0s) by DBD::_::db::selectall_arrayref at line 197 of /usr/share/koha/lib/C4/VirtualShelves.pm, avg 11µs/call # 2 times (17µs+0s) by C4::Context::_new_marcfromkohafield at line 1010 of /usr/share/koha/lib/C4/Context.pm, avg 8µs/call # 2 times (16µs+0s) by C4::Koha::GetItemTypes at line 205, avg 8µs/call # 2 times (14µs+0s) by C4::Branch::GetBranchCategories at line 381 of /usr/share/koha/lib/C4/Auth.pm, avg 7µs/call # 2 times (9µs+0s) by C4::Koha::GetAuthValCode at line 1657 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # 2 times (7µs+0s) by C4::Koha::GetKohaAuthorisedValues at line 1654 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # 2 times (7µs+0s) by C4::Search::searchResults at line 1666 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # 2 times (7µs+0s) by C4::Languages::getAllLanguages at line 201, avg 4µs/call # 2 times (6µs+0s) by C4::Branch::GetBranchCategories at line 196, avg 3µs/call
sub DBI::common::DESTROY; # xsub
# spent 19.7ms within DBI::common::FETCH which was called 2011 times, avg 10µs/call: # 624 times (3.13ms+0s) by DBI::st::fetchrow_hashref at line 255 of /usr/share/koha/lib/C4/Koha.pm, avg 5µs/call # 297 times (2.61ms+0s) by DBI::st::fetchrow_hashref at line 124 of /usr/share/koha/lib/C4/Branch.pm, avg 9µs/call # 174 times (2.64ms+0s) by DBI::st::fetchrow_hashref at line 1596 of /usr/share/koha/lib/C4/Biblio.pm, avg 15µs/call # 143 times (1.65ms+0s) by DBI::st::fetchrow_hashref at line 1248 of /usr/share/koha/lib/C4/Koha.pm, avg 12µs/call # 78 times (520µs+0s) by DBI::st::fetchrow_hashref at line 214 of /usr/share/koha/lib/C4/Languages.pm, avg 7µs/call # 77 times (562µs+0s) by DBI::st::fetchrow_hashref at line 211 of /usr/share/koha/lib/C4/Languages.pm, avg 7µs/call # 76 times (594µs+0s) by DBI::st::fetchrow_hashref at line 199 of /usr/share/koha/lib/C4/Languages.pm, avg 8µs/call # 75 times (834µs+0s) by DBI::st::fetchrow_hashref at line 683 of /usr/share/koha/lib/C4/Biblio.pm, avg 11µs/call # 57 times (1.35ms+0s) by DBI::st::fetchrow_hashref at line 1246 of /usr/share/koha/lib/C4/Items.pm, avg 24µs/call # 57 times (953µs+0s) by DBI::st::fetchrow_hashref at line 443 of /usr/share/koha/lib/C4/Koha.pm, avg 17µs/call # 39 times (346µs+0s) by DBI::st::fetchrow_hashref at line 355 of /usr/share/koha/lib/C4/Languages.pm, avg 9µs/call # 39 times (179µs+0s) by DBI::st::fetchrow_hashref at line 194 of /usr/share/koha/lib/C4/Languages.pm, avg 5µs/call # 32 times (1.35ms+0s) by DBI::st::fetchrow_hashref at line 1316 of /usr/share/koha/lib/C4/Items.pm, avg 42µs/call # 32 times (626µs+0s) by DBI::st::fetchrow_hashref at line 1249 of /usr/share/koha/lib/C4/Items.pm, avg 20µs/call # 32 times (588µs+0s) by DBI::st::fetchrow_hashref at line 1274 of /usr/share/koha/lib/C4/Items.pm, avg 18µs/call # 32 times (332µs+0s) by DBI::st::fetchrow_hashref at line 2039 of DBI.pm, avg 10µs/call # 28 times (108µs+0s) by DBI::st::fetchrow_hashref at line 1072 of /usr/share/koha/lib/C4/Koha.pm, avg 4µs/call # 27 times (235µs+0s) by DBI::st::fetchrow_hashref at line 361 of /usr/share/koha/lib/C4/Languages.pm, avg 9µs/call # 25 times (519µs+0s) by DBI::st::fetchrow_hashref at line 2627 of /usr/share/koha/lib/C4/Biblio.pm, avg 21µs/call # 25 times (261µs+0s) by DBI::st::fetchrow_hashref at line 1257 of /usr/share/koha/lib/C4/Biblio.pm, avg 10µs/call # 24 times (154µs+0s) by DBI::st::fetchrow_hashref at line 1667 of /usr/share/koha/lib/C4/Search.pm, avg 6µs/call # 11 times (40µs+0s) by DBI::st::fetchrow_hashref at line 1648 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # 3 times (31µs+0s) by CGI::Session::Driver::DBI::DESTROY at line 141 of CGI/Session/Driver/DBI.pm, avg 10µs/call # once (18µs+0s) by C4::Context::_new_dbh at line 811 of /usr/share/koha/lib/C4/Context.pm # once (8µs+0s) by DBI::st::fetchrow_hashref at line 606 of /usr/share/koha/lib/C4/Branch.pm # once (6µs+0s) by DBI::__ANON__[/usr/lib/perl5/DBI.pm:728] at line 717 of DBI.pm # once (6µs+0s) by C4::Context::_new_dbh at line 812 of /usr/share/koha/lib/C4/Context.pm
sub DBI::common::FETCH; # xsub
# spent 1.01ms within DBI::common::STORE which was called 12 times, avg 84µs/call: # 3 times (958µs+0s) by DBI::__ANON__[/usr/lib/perl5/DBI.pm:728] at line 714 of DBI.pm, avg 319µs/call # 2 times (11µs+0s) by C4::Context::_new_dbh at line 810 of /usr/share/koha/lib/C4/Context.pm, avg 6µs/call # 2 times (8µs+0s) by C4::Context::_new_dbh at line 811 of /usr/share/koha/lib/C4/Context.pm, avg 4µs/call # 2 times (7µs+0s) by C4::Context::_new_dbh at line 812 of /usr/share/koha/lib/C4/Context.pm, avg 4µs/call # once (13µs+0s) by DBI::connect at line 732 of DBI.pm # once (11µs+0s) by DBI::__ANON__[/usr/lib/perl5/DBI.pm:728] at line 717 of DBI.pm # once (3µs+0s) by C4::Context::_new_dbh at line 824 of /usr/share/koha/lib/C4/Context.pm
sub DBI::common::STORE; # xsub
# spent 10µs within DBI::db::connected which was called: # once (10µs+0s) by DBI::__ANON__[/usr/lib/perl5/DBI.pm:728] at line 723 of DBI.pm
sub DBI::db::connected; # xsub
# spent 13.6ms within DBI::db::do which was called 5 times, avg 2.72ms/call: # 3 times (11.8ms+0s) by CGI::Session::Driver::mysql::store at line 50 of CGI/Session/Driver/mysql.pm, avg 3.93ms/call # once (979µs+0s) by C4::Context::_new_dbh at line 825 of /usr/share/koha/lib/C4/Context.pm # once (852µs+0s) by C4::Context::_new_dbh at line 813 of /usr/share/koha/lib/C4/Context.pm
sub DBI::db::do; # xsub
# spent 1.40s within DBI::db::ping which was called 1484 times, avg 943µs/call: # 1481 times (1.40s+0s) by C4::Context::dbh at line 856 of /usr/share/koha/lib/C4/Context.pm, avg 943µs/call # 3 times (2.60ms+0s) by CGI::Session::Driver::DBI::DESTROY at line 136 of CGI/Session/Driver/DBI.pm, avg 866µs/call
sub DBI::db::ping; # xsub
# spent 160ms (23.0+137) within DBI::db::prepare which was called 1653 times, avg 97µs/call: # 174 times (2.66ms+14.9ms) by C4::Biblio::GetAuthorisedValueDesc at line 1594 of /usr/share/koha/lib/C4/Biblio.pm, avg 101µs/call # 161 times (1.46ms+13.1ms) by DBI::db::selectrow_array at line 558 of /usr/share/koha/lib/C4/Context.pm, avg 91µs/call # 148 times (2.34ms+12.0ms) by C4::Koha::GetAuthValCode at line 1000 of /usr/share/koha/lib/C4/Koha.pm, avg 97µs/call # 143 times (2.25ms+12.1ms) by C4::Koha::GetKohaAuthorisedValueLib at line 1246 of /usr/share/koha/lib/C4/Koha.pm, avg 100µs/call # 100 times (1.71ms+9.56ms) by C4::Biblio::GetFrameworkCode at line 2085 of /usr/share/koha/lib/C4/Biblio.pm, avg 113µs/call # 75 times (1.21ms+6.88ms) by C4::Biblio::GetRecordValue at line 678 of /usr/share/koha/lib/C4/Biblio.pm, avg 108µs/call # 64 times (1.08ms+6.07ms) by C4::Circulation::GetTransfers at line 2785 of /usr/share/koha/lib/C4/Circulation.pm, avg 112µs/call # 64 times (972µs+6.00ms) by C4::Branch::GetBranchName at line 182 of /usr/share/koha/lib/C4/Branch.pm, avg 109µs/call # 64 times (931µs+5.24ms) by C4::Reserves::GetReserveStatus at line 754 of /usr/share/koha/lib/C4/Reserves.pm, avg 96µs/call # 57 times (890µs+5.51ms) by C4::Koha::getitemtypeinfo at line 441 of /usr/share/koha/lib/C4/Koha.pm, avg 112µs/call # 51 times (568µs+3.50ms) by C4::Koha::GetKohaAuthorisedValues at line 1171 of /usr/share/koha/lib/C4/Koha.pm, avg 80µs/call # 38 times (480µs+2.77ms) by C4::Languages::getAllLanguages at line 209 of /usr/share/koha/lib/C4/Languages.pm, avg 86µs/call # 38 times (359µs+2.39ms) by C4::Languages::getAllLanguages at line 202 of /usr/share/koha/lib/C4/Languages.pm, avg 72µs/call # 38 times (300µs+2.11ms) by C4::Languages::getAllLanguages at line 197 of /usr/share/koha/lib/C4/Languages.pm, avg 64µs/call # 33 times (399µs+2.35ms) by C4::Languages::language_get_description at line 352 of /usr/share/koha/lib/C4/Languages.pm, avg 83µs/call # 32 times (370µs+2.78ms) by C4::Reserves::GetReserveStatus at line 760 of /usr/share/koha/lib/C4/Reserves.pm, avg 98µs/call # 32 times (348µs+2.45ms) by C4::Items::GetItemsInfo at line 1269 of /usr/share/koha/lib/C4/Items.pm, avg 87µs/call # 32 times (407µs+2.11ms) by C4::Items::GetItemsInfo at line 1298 of /usr/share/koha/lib/C4/Items.pm, avg 79µs/call # 32 times (301µs+2.03ms) by C4::Items::GetItemsInfo at line 1309 of /usr/share/koha/lib/C4/Items.pm, avg 73µs/call # 27 times (399µs+2.18ms) by C4::Branch::GetBranches at line 117 of /usr/share/koha/lib/C4/Branch.pm, avg 96µs/call # 27 times (376µs+2.14ms) by C4::Branch::GetBranches at line 120 of /usr/share/koha/lib/C4/Branch.pm, avg 93µs/call # 27 times (219µs+1.59ms) by C4::Languages::language_get_description at line 359 of /usr/share/koha/lib/C4/Languages.pm, avg 67µs/call # 26 times (468µs+2.57ms) by C4::Koha::GetItemTypes at line 253 of /usr/share/koha/lib/C4/Koha.pm, avg 117µs/call # 25 times (368µs+2.85ms) by C4::Items::GetItemsInfo at line 1234 of /usr/share/koha/lib/C4/Items.pm, avg 129µs/call # 25 times (492µs+2.62ms) by C4::Items::GetItemsInfo at line 1240 of /usr/share/koha/lib/C4/Items.pm, avg 124µs/call # 25 times (376µs+2.32ms) by C4::Biblio::GetMarcBiblio at line 1255 of /usr/share/koha/lib/C4/Biblio.pm, avg 108µs/call # 25 times (381µs+2.05ms) by C4::Tags::get_tags at line 283 of /usr/share/koha/lib/C4/Tags.pm, avg 97µs/call # 25 times (323µs+1.69ms) by C4::Biblio::CountItemsIssued at line 2625 of /usr/share/koha/lib/C4/Biblio.pm, avg 80µs/call # 25 times (314µs+1.37ms) by C4::Items::GetItemsInfo at line 1245 of /usr/share/koha/lib/C4/Items.pm, avg 67µs/call # 3 times (48µs+393µs) by C4::Biblio::GetMarcStructure at line 1110 of /usr/share/koha/lib/C4/Biblio.pm, avg 147µs/call # 3 times (54µs+302µs) by C4::XSLT::getAuthorisedValues4MARCSubfields at line 122 of /usr/share/koha/lib/C4/XSLT.pm, avg 119µs/call # 3 times (36µs+167µs) by C4::Biblio::GetMarcStructure at line 1094 of /usr/share/koha/lib/C4/Biblio.pm, avg 68µs/call # 2 times (23µs+157µs) by C4::Branch::GetBranchCategories at line 365 of /usr/share/koha/lib/C4/Branch.pm, avg 90µs/call # 2 times (21µs+111µs) by C4::Koha::GetAuthorisedValues at line 1069 of /usr/share/koha/lib/C4/Koha.pm, avg 66µs/call # once (20µs+108µs) by C4::Search::searchResults at line 1677 of /usr/share/koha/lib/C4/Search.pm # once (16µs+109µs) by DBD::_::db::selectall_arrayref at line 1634 of DBI.pm # once (15µs+90µs) by C4::Search::searchResults at line 1646 of /usr/share/koha/lib/C4/Search.pm # once (16µs+71µs) by C4::Branch::GetBranchesCount at line 604 of /usr/share/koha/lib/C4/Branch.pm # once (12µs+66µs) by C4::Context::_new_marcfromkohafield at line 1022 of /usr/share/koha/lib/C4/Context.pm # once (11µs+65µs) by C4::Search::searchResults at line 1662 of /usr/share/koha/lib/C4/Search.pm # once (10µs+55µs) by C4::Languages::getAllLanguages at line 192 of /usr/share/koha/lib/C4/Languages.pm
sub DBI::db::prepare; # xsub
# spent 1.50ms (74µs+1.42) within DBI::db::selectall_arrayref which was called: # once (74µs+1.42ms) by C4::VirtualShelves::GetSomeShelfNames at line 197 of /usr/share/koha/lib/C4/VirtualShelves.pm
sub DBI::db::selectall_arrayref; # xsub
# spent 170ms (155+14.6) within DBI::db::selectrow_array which was called 161 times, avg 1.06ms/call: # 161 times (155ms+14.6ms) by C4::Context::preference at line 558 of /usr/share/koha/lib/C4/Context.pm, avg 1.06ms/call
sub DBI::db::selectrow_array; # xsub
# spent 8.56ms (34µs+8.53) within DBI::dr::connect which was called: # once (34µs+8.53ms) by DBI::__ANON__[/usr/lib/perl5/DBI.pm:728] at line 662 of DBI.pm
sub DBI::dr::connect; # xsub
# spent 25µs within DBI::dr::disconnect_all which was called: # once (25µs+0s) by DBI::disconnect_all at line 740 of DBI.pm
sub DBI::dr::disconnect_all; # xsub
# spent 2.01s within DBI::st::execute which was called 1718 times, avg 1.17ms/call: # 270 times (259ms+0s) by C4::Branch::GetBranches at line 125 of /usr/share/koha/lib/C4/Branch.pm, avg 959µs/call # 174 times (178ms+0s) by C4::Biblio::GetAuthorisedValueDesc at line 1595 of /usr/share/koha/lib/C4/Biblio.pm, avg 1.02ms/call # 148 times (146ms+0s) by C4::Koha::GetAuthValCode at line 1001 of /usr/share/koha/lib/C4/Koha.pm, avg 988µs/call # 143 times (148ms+0s) by C4::Koha::GetKohaAuthorisedValueLib at line 1247 of /usr/share/koha/lib/C4/Koha.pm, avg 1.04ms/call # 100 times (109ms+0s) by C4::Biblio::GetFrameworkCode at line 2086 of /usr/share/koha/lib/C4/Biblio.pm, avg 1.09ms/call # 75 times (75.3ms+0s) by C4::Biblio::GetRecordValue at line 679 of /usr/share/koha/lib/C4/Biblio.pm, avg 1.00ms/call # 64 times (72.8ms+0s) by C4::Circulation::GetTransfers at line 2786 of /usr/share/koha/lib/C4/Circulation.pm, avg 1.14ms/call # 64 times (70.8ms+0s) by C4::Reserves::GetReserveStatus at line 755 of /usr/share/koha/lib/C4/Reserves.pm, avg 1.11ms/call # 64 times (62.2ms+0s) by C4::Branch::GetBranchName at line 183 of /usr/share/koha/lib/C4/Branch.pm, avg 971µs/call # 57 times (59.9ms+0s) by C4::Koha::getitemtypeinfo at line 442 of /usr/share/koha/lib/C4/Koha.pm, avg 1.05ms/call # 51 times (51.6ms+0s) by C4::Koha::GetKohaAuthorisedValues at line 1172 of /usr/share/koha/lib/C4/Koha.pm, avg 1.01ms/call # 39 times (44.8ms+0s) by C4::Languages::getAllLanguages at line 212 of /usr/share/koha/lib/C4/Languages.pm, avg 1.15ms/call # 38 times (48.9ms+0s) by C4::Languages::getAllLanguages at line 203 of /usr/share/koha/lib/C4/Languages.pm, avg 1.29ms/call # 38 times (41.3ms+0s) by C4::Languages::getAllLanguages at line 198 of /usr/share/koha/lib/C4/Languages.pm, avg 1.09ms/call # 33 times (33.9ms+0s) by C4::Languages::language_get_description at line 354 of /usr/share/koha/lib/C4/Languages.pm, avg 1.03ms/call # 32 times (58.3ms+0s) by C4::Items::GetItemsInfo at line 1314 of /usr/share/koha/lib/C4/Items.pm, avg 1.82ms/call # 32 times (42.8ms+0s) by C4::Items::GetItemsInfo at line 1248 of /usr/share/koha/lib/C4/Items.pm, avg 1.34ms/call # 32 times (36.7ms+0s) by C4::Reserves::GetReserveStatus at line 761 of /usr/share/koha/lib/C4/Reserves.pm, avg 1.15ms/call # 32 times (35.3ms+0s) by C4::Items::GetItemsInfo at line 1273 of /usr/share/koha/lib/C4/Items.pm, avg 1.10ms/call # 32 times (30.4ms+0s) by C4::Items::GetItemsInfo at line 1305 of /usr/share/koha/lib/C4/Items.pm, avg 948µs/call # 27 times (32.8ms+0s) by C4::Branch::GetBranches at line 118 of /usr/share/koha/lib/C4/Branch.pm, avg 1.22ms/call # 27 times (25.2ms+0s) by C4::Languages::language_get_description at line 360 of /usr/share/koha/lib/C4/Languages.pm, avg 935µs/call # 26 times (29.4ms+0s) by C4::Koha::GetItemTypes at line 254 of /usr/share/koha/lib/C4/Koha.pm, avg 1.13ms/call # 25 times (74.6ms+0s) by C4::Items::GetItemsInfo at line 1235 of /usr/share/koha/lib/C4/Items.pm, avg 2.98ms/call # 25 times (39.2ms+0s) by C4::Biblio::GetMarcBiblio at line 1256 of /usr/share/koha/lib/C4/Biblio.pm, avg 1.57ms/call # 25 times (34.6ms+0s) by C4::Tags::get_tags at line 284 of /usr/share/koha/lib/C4/Tags.pm, avg 1.38ms/call # 25 times (33.8ms+0s) by C4::Biblio::CountItemsIssued at line 2626 of /usr/share/koha/lib/C4/Biblio.pm, avg 1.35ms/call # 3 times (107ms+0s) by C4::Biblio::GetMarcStructure at line 1118 of /usr/share/koha/lib/C4/Biblio.pm, avg 35.6ms/call # 3 times (7.44ms+0s) by C4::Biblio::GetMarcStructure at line 1100 of /usr/share/koha/lib/C4/Biblio.pm, avg 2.48ms/call # 3 times (2.95ms+0s) by C4::XSLT::getAuthorisedValues4MARCSubfields at line 127 of /usr/share/koha/lib/C4/XSLT.pm, avg 985µs/call # 2 times (2.31ms+0s) by C4::Koha::GetAuthorisedValues at line 1071 of /usr/share/koha/lib/C4/Koha.pm, avg 1.16ms/call # 2 times (1.79ms+0s) by C4::Branch::GetBranchCategories at line 366 of /usr/share/koha/lib/C4/Branch.pm, avg 893µs/call # once (4.60ms+0s) by C4::Search::searchResults at line 1678 of /usr/share/koha/lib/C4/Search.pm # once (1.69ms+0s) by C4::Search::searchResults at line 1647 of /usr/share/koha/lib/C4/Search.pm # once (1.35ms+0s) by C4::Context::_new_marcfromkohafield at line 1023 of /usr/share/koha/lib/C4/Context.pm # once (1.07ms+0s) by C4::Languages::getAllLanguages at line 193 of /usr/share/koha/lib/C4/Languages.pm # once (1.02ms+0s) by C4::Search::searchResults at line 1666 of /usr/share/koha/lib/C4/Search.pm # once (907µs+0s) by DBD::_::db::selectall_arrayref at line 1636 of DBI.pm # once (838µs+0s) by C4::Branch::GetBranchesCount at line 605 of /usr/share/koha/lib/C4/Branch.pm
sub DBI::st::execute; # xsub
# spent 17.5ms within DBI::st::fetch which was called 2005 times, avg 9µs/call: # 624 times (3.73ms+0s) by DBI::st::fetchrow_hashref at line 255 of /usr/share/koha/lib/C4/Koha.pm, avg 6µs/call # 297 times (3.54ms+0s) by DBI::st::fetchrow_hashref at line 124 of /usr/share/koha/lib/C4/Branch.pm, avg 12µs/call # 174 times (1.59ms+0s) by DBI::st::fetchrow_hashref at line 1596 of /usr/share/koha/lib/C4/Biblio.pm, avg 9µs/call # 143 times (1.27ms+0s) by DBI::st::fetchrow_hashref at line 1248 of /usr/share/koha/lib/C4/Koha.pm, avg 9µs/call # 78 times (543µs+0s) by DBI::st::fetchrow_hashref at line 214 of /usr/share/koha/lib/C4/Languages.pm, avg 7µs/call # 77 times (563µs+0s) by DBI::st::fetchrow_hashref at line 211 of /usr/share/koha/lib/C4/Languages.pm, avg 7µs/call # 76 times (521µs+0s) by DBI::st::fetchrow_hashref at line 199 of /usr/share/koha/lib/C4/Languages.pm, avg 7µs/call # 75 times (665µs+0s) by DBI::st::fetchrow_hashref at line 683 of /usr/share/koha/lib/C4/Biblio.pm, avg 9µs/call # 57 times (1.08ms+0s) by DBI::st::fetchrow_hashref at line 1246 of /usr/share/koha/lib/C4/Items.pm, avg 19µs/call # 57 times (678µs+0s) by DBI::st::fetchrow_hashref at line 443 of /usr/share/koha/lib/C4/Koha.pm, avg 12µs/call # 39 times (380µs+0s) by DBI::st::fetchrow_hashref at line 194 of /usr/share/koha/lib/C4/Languages.pm, avg 10µs/call # 39 times (291µs+0s) by DBI::st::fetchrow_hashref at line 355 of /usr/share/koha/lib/C4/Languages.pm, avg 7µs/call # 32 times (455µs+0s) by DBI::st::fetchrow_hashref at line 1274 of /usr/share/koha/lib/C4/Items.pm, avg 14µs/call # 32 times (291µs+0s) by DBI::st::fetchrow_hashref at line 1316 of /usr/share/koha/lib/C4/Items.pm, avg 9µs/call # 32 times (280µs+0s) by DBI::st::fetchrow_hashref at line 1249 of /usr/share/koha/lib/C4/Items.pm, avg 9µs/call # 32 times (252µs+0s) by DBI::st::fetchrow_hashref at line 2039 of DBI.pm, avg 8µs/call # 28 times (155µs+0s) by DBI::st::fetchrow_hashref at line 1072 of /usr/share/koha/lib/C4/Koha.pm, avg 6µs/call # 27 times (203µs+0s) by DBI::st::fetchrow_hashref at line 361 of /usr/share/koha/lib/C4/Languages.pm, avg 8µs/call # 25 times (582µs+0s) by DBI::st::fetchrow_hashref at line 1257 of /usr/share/koha/lib/C4/Biblio.pm, avg 23µs/call # 25 times (220µs+0s) by DBI::st::fetchrow_hashref at line 2627 of /usr/share/koha/lib/C4/Biblio.pm, avg 9µs/call # 24 times (174µs+0s) by DBI::st::fetchrow_hashref at line 1667 of /usr/share/koha/lib/C4/Search.pm, avg 7µs/call # 11 times (42µs+0s) by DBI::st::fetchrow_hashref at line 1648 of /usr/share/koha/lib/C4/Search.pm, avg 4µs/call # once (6µs+0s) by DBI::st::fetchrow_hashref at line 606 of /usr/share/koha/lib/C4/Branch.pm
sub DBI::st::fetch; # xsub
# spent 2.67ms (607µs+2.06) within DBI::st::fetchall_arrayref which was called 28 times, avg 95µs/call: # 25 times (491µs+1.67ms) by C4::Tags::get_tags at line 289 of /usr/share/koha/lib/C4/Tags.pm, avg 87µs/call # 2 times (53µs+167µs) by C4::Branch::GetBranchCategories at line 368 of /usr/share/koha/lib/C4/Branch.pm, avg 110µs/call # once (63µs+217µs) by DBD::_::db::selectall_arrayref at line 1644 of DBI.pm
sub DBI::st::fetchall_arrayref; # xsub
# spent 83.3ms within DBI::st::fetchrow which was called 11833 times, avg 7µs/call: # 10416 times (73.8ms+0s) by C4::Biblio::GetMarcStructure at line 1152 of /usr/share/koha/lib/C4/Biblio.pm, avg 7µs/call # 890 times (4.90ms+0s) by C4::Biblio::GetMarcStructure at line 1107 of /usr/share/koha/lib/C4/Biblio.pm, avg 6µs/call # 304 times (1.37ms+0s) by C4::Context::_new_marcfromkohafield at line 1024 of /usr/share/koha/lib/C4/Context.pm, avg 4µs/call # 100 times (1.95ms+0s) by C4::Biblio::GetFrameworkCode at line 2087 of /usr/share/koha/lib/C4/Biblio.pm, avg 19µs/call # 44 times (393µs+0s) by C4::XSLT::getAuthorisedValues4MARCSubfields at line 129 of /usr/share/koha/lib/C4/XSLT.pm, avg 9µs/call # 41 times (268µs+0s) by C4::Search::searchResults at line 1680 of /usr/share/koha/lib/C4/Search.pm, avg 7µs/call # 32 times (424µs+0s) by C4::Items::GetItemsInfo at line 1306 of /usr/share/koha/lib/C4/Items.pm, avg 13µs/call # 3 times (144µs+0s) by C4::Biblio::GetMarcStructure at line 1132 of /usr/share/koha/lib/C4/Biblio.pm, avg 48µs/call # 3 times (47µs+0s) by C4::Biblio::GetMarcStructure at line 1103 of /usr/share/koha/lib/C4/Biblio.pm, avg 16µs/call
sub DBI::st::fetchrow; # xsub
# spent 14.4ms within DBI::st::fetchrow_array which was called 1366 times, avg 11µs/call: # 724 times (4.50ms+0s) by C4::Koha::GetKohaAuthorisedValues at line 1173 of /usr/share/koha/lib/C4/Koha.pm, avg 6µs/call # 270 times (3.80ms+0s) by C4::Branch::GetBranches at line 126 of /usr/share/koha/lib/C4/Branch.pm, avg 14µs/call # 148 times (2.38ms+0s) by C4::Koha::GetAuthValCode at line 1002 of /usr/share/koha/lib/C4/Koha.pm, avg 16µs/call # 64 times (1.22ms+0s) by C4::Branch::GetBranchName at line 184 of /usr/share/koha/lib/C4/Branch.pm, avg 19µs/call # 64 times (1.08ms+0s) by C4::Reserves::GetReserveStatus at line 756 of /usr/share/koha/lib/C4/Reserves.pm, avg 17µs/call # 64 times (960µs+0s) by C4::Circulation::GetTransfers at line 2787 of /usr/share/koha/lib/C4/Circulation.pm, avg 15µs/call # 32 times (432µs+0s) by C4::Reserves::GetReserveStatus at line 762 of /usr/share/koha/lib/C4/Reserves.pm, avg 13µs/call
sub DBI::st::fetchrow_array; # xsub
# spent 91.0ms (53.9+37.1) within DBI::st::fetchrow_hashref which was called 2005 times, avg 45µs/call: # 624 times (10.8ms+6.85ms) by C4::Koha::GetItemTypes at line 255 of /usr/share/koha/lib/C4/Koha.pm, avg 28µs/call # 297 times (11.2ms+6.14ms) by C4::Branch::GetBranches at line 124 of /usr/share/koha/lib/C4/Branch.pm, avg 58µs/call # 174 times (5.75ms+4.24ms) by C4::Biblio::GetAuthorisedValueDesc at line 1596 of /usr/share/koha/lib/C4/Biblio.pm, avg 57µs/call # 143 times (3.77ms+2.92ms) by C4::Koha::GetKohaAuthorisedValueLib at line 1248 of /usr/share/koha/lib/C4/Koha.pm, avg 47µs/call # 78 times (1.46ms+1.06ms) by C4::Languages::getAllLanguages at line 214 of /usr/share/koha/lib/C4/Languages.pm, avg 32µs/call # 77 times (1.70ms+1.12ms) by C4::Languages::getAllLanguages at line 211 of /usr/share/koha/lib/C4/Languages.pm, avg 37µs/call # 76 times (1.54ms+1.11ms) by C4::Languages::getAllLanguages at line 199 of /usr/share/koha/lib/C4/Languages.pm, avg 35µs/call # 75 times (1.90ms+1.50ms) by C4::Biblio::GetRecordValue at line 683 of /usr/share/koha/lib/C4/Biblio.pm, avg 45µs/call # 57 times (3.94ms+2.43ms) by C4::Items::GetItemsInfo at line 1246 of /usr/share/koha/lib/C4/Items.pm, avg 112µs/call # 57 times (2.27ms+1.63ms) by C4::Koha::getitemtypeinfo at line 443 of /usr/share/koha/lib/C4/Koha.pm, avg 68µs/call # 39 times (1.10ms+637µs) by C4::Languages::language_get_description at line 355 of /usr/share/koha/lib/C4/Languages.pm, avg 45µs/call # 39 times (643µs+559µs) by C4::Languages::getAllLanguages at line 194 of /usr/share/koha/lib/C4/Languages.pm, avg 31µs/call # 32 times (1.61ms+1.04ms) by C4::Items::GetItemsInfo at line 1274 of /usr/share/koha/lib/C4/Items.pm, avg 83µs/call # 32 times (872µs+1.65ms) by C4::Items::GetItemsInfo at line 1316 of /usr/share/koha/lib/C4/Items.pm, avg 79µs/call # 32 times (816µs+906µs) by C4::Items::GetItemsInfo at line 1249 of /usr/share/koha/lib/C4/Items.pm, avg 54µs/call # 32 times (695µs+584µs) by DBD::_::st::fetchall_arrayref at line 2039 of DBI.pm, avg 40µs/call # 28 times (439µs+263µs) by C4::Koha::GetAuthorisedValues at line 1072 of /usr/share/koha/lib/C4/Koha.pm, avg 25µs/call # 27 times (535µs+438µs) by C4::Languages::language_get_description at line 361 of /usr/share/koha/lib/C4/Languages.pm, avg 36µs/call # 25 times (1.22ms+738µs) by C4::Biblio::CountItemsIssued at line 2627 of /usr/share/koha/lib/C4/Biblio.pm, avg 79µs/call # 25 times (724µs+843µs) by C4::Biblio::GetMarcBiblio at line 1257 of /usr/share/koha/lib/C4/Biblio.pm, avg 63µs/call # 24 times (737µs+328µs) by C4::Search::searchResults at line 1667 of /usr/share/koha/lib/C4/Search.pm, avg 44µs/call # 11 times (115µs+82µs) by C4::Search::searchResults at line 1648 of /usr/share/koha/lib/C4/Search.pm, avg 18µs/call # once (25µs+14µs) by C4::Branch::GetBranchesCount at line 606 of /usr/share/koha/lib/C4/Branch.pm
sub DBI::st::fetchrow_hashref; # xsub
# spent 927µs within DBI::st::finish which was called 132 times, avg 7µs/call: # 64 times (544µs+0s) by C4::Branch::GetBranchName at line 185 of /usr/share/koha/lib/C4/Branch.pm, avg 8µs/call # 64 times (365µs+0s) by C4::Circulation::GetTransfers at line 2788 of /usr/share/koha/lib/C4/Circulation.pm, avg 6µs/call # 2 times (12µs+0s) by C4::Branch::GetBranchCategories at line 369 of /usr/share/koha/lib/C4/Branch.pm, avg 6µs/call # 2 times (7µs+0s) by C4::Koha::GetAuthorisedValues at line 1085 of /usr/share/koha/lib/C4/Koha.pm, avg 3µs/call
sub DBI::st::finish; # xsub
# spent 422µs within Internals::SvREADONLY which was called 268 times, avg 2µs/call: # 268 times (422µs+0s) by constant::import at line 111 of constant.pm, avg 2µs/call
sub Internals::SvREADONLY; # xsub
# spent 276µs within Regexp::DESTROY which was called 268 times, avg 1µs/call: # 112 times (85µs+0s) by C4::Languages::regex_lang_subtags at line 307 of /usr/share/koha/lib/C4/Languages.pm, avg 757ns/call # 80 times (95µs+0s) by C4::Languages::regex_lang_subtags at line 331 of /usr/share/koha/lib/C4/Languages.pm, avg 1µs/call # 16 times (10µs+0s) by C4::Languages::regex_lang_subtags at line 189 of /usr/share/koha/lib/C4/Languages.pm, avg 644ns/call # 16 times (10µs+0s) by C4::Languages::regex_lang_subtags at line 257 of /usr/share/koha/lib/C4/Templates.pm, avg 644ns/call # 16 times (10µs+0s) by C4::Languages::regex_lang_subtags at line 303 of /usr/share/koha/lib/C4/Languages.pm, avg 625ns/call # 15 times (36µs+0s) by C4::Languages::regex_lang_subtags at line 440 of /usr/share/koha/lib/C4/Languages.pm, avg 2µs/call # 8 times (18µs+0s) by Template::Parser::split_text at line 285 of Template/Parser.pm, avg 2µs/call # 4 times (9µs+0s) by Date::Manip::Base::_config_var_setdate at line 1420 of Date/Manip/Base.pm, avg 2µs/call # once (2µs+0s) by Date::Manip::Date::BEGIN@14 at line 14 of Date/Manip/Date.pm
sub Regexp::DESTROY; # xsub
# spent 318µs within UNIVERSAL::VERSION which was called 11 times, avg 29µs/call: # once (72µs+0s) by DateTime::Set::BEGIN@10 at line 10 of DateTime/Set.pm # once (42µs+0s) by C4::Letters::BEGIN@23 at line 1 of (eval 1010)[MIME/Lite.pm:439] # once (33µs+0s) by IO::Socket::BEGIN@12 at line 12 of IO/Socket.pm # once (28µs+0s) by DateTime::BEGIN@40 at line 40 of DateTime.pm # once (25µs+0s) by DateTime::Set::BEGIN@7 at line 7 of DateTime/Set.pm # once (25µs+0s) by XML::LibXML::VERSION at line 51 of XML/LibXML.pm # once (23µs+0s) by Set::Infinite::_recurrence::BEGIN@15 at line 15 of Set/Infinite/_recurrence.pm # once (20µs+0s) by DateTime::Format::Builder::BEGIN@13 at line 13 of DateTime/Format/Builder.pm # once (19µs+0s) by Business::ISBN::BEGIN@75 at line 75 of Business/ISBN.pm # once (16µs+0s) by Text::CSV::BEGIN@1 at line 2 of (eval 1016)[Text/CSV.pm:150] # once (15µs+0s) by DateTime::BEGIN@41 at line 41 of DateTime.pm
sub UNIVERSAL::VERSION; # xsub
# spent 1.18ms within UNIVERSAL::can which was called 392 times, avg 3µs/call: # 44 times (88µs+0s) by Math::BigInt::import at line 2688 of Math/BigInt.pm, avg 2µs/call # 31 times (113µs+0s) by XML::SAX::Base::end_prefix_mapping at line 48 of XML/SAX/Base.pm, avg 4µs/call # 31 times (82µs+0s) by XML::SAX::Base::start_prefix_mapping at line 1106 of XML/SAX/Base.pm, avg 3µs/call # 31 times (72µs+0s) by XML::SAX::Base::set_document_locator at line 1612 of XML/SAX/Base.pm, avg 2µs/call # 31 times (56µs+0s) by XML::SAX::Base::xml_decl at line 439 of XML/SAX/Base.pm, avg 2µs/call # 28 times (231µs+0s) by XML::SAX::ParserFactory::parser at line 36 of XML/SAX/ParserFactory.pm, avg 8µs/call # 28 times (99µs+0s) by XML::SAX::Base::parse at line 2602 of XML/SAX/Base.pm, avg 4µs/call # 28 times (82µs+0s) by XML::SAX::Base::start_element at line 278 of XML/SAX/Base.pm, avg 3µs/call # 28 times (65µs+0s) by XML::SAX::Base::characters at line 186 of XML/SAX/Base.pm, avg 2µs/call # 28 times (64µs+0s) by XML::SAX::Base::end_document at line 1428 of XML/SAX/Base.pm, avg 2µs/call # 28 times (63µs+0s) by XML::SAX::Base::end_element at line 2187 of XML/SAX/Base.pm, avg 2µs/call # 28 times (62µs+0s) by XML::SAX::Base::start_document at line 1244 of XML/SAX/Base.pm, avg 2µs/call # 10 times (36µs+0s) by DateTime::Format::Builder::Parser::create_single_parser at line 330 of DateTime/Format/Builder/Parser.pm, avg 4µs/call # 6 times (19µs+0s) by XML::SAX::Base::comment at line 2348 of XML/SAX/Base.pm, avg 3µs/call # 3 times (18µs+0s) by CGI::Session::Serialize::yaml::freeze at line 18 of CGI/Session/Serialize/yaml.pm, avg 6µs/call # 3 times (14µs+0s) by Math::BigInt::import at line 2749 of Math/BigInt.pm, avg 5µs/call # once (4µs+0s) by Net::LDAP::import at line 46 of Net/LDAP.pm # once (4µs+0s) by autouse::vet_import at line 75 of autouse.pm # once (3µs+0s) by XML::LibXML::VERSION at line 41 of XML/LibXML.pm # once (3µs+0s) by Math::BigInt::import at line 2672 of Math/BigInt.pm # once (2µs+0s) by DateTime::Locale::_load_class_from_id at line 292 of DateTime/Locale.pm # once (2µs+0s) by DateTime::Locale::_load_class_from_id at line 279 of DateTime/Locale.pm
sub UNIVERSAL::can; # xsub
# spent 11.0ms within UNIVERSAL::isa which was called 4869 times, avg 2µs/call: # 2634 times (6.71ms+0s) by XML::LibXML::SAX::Parser::process_element at line 170 of XML/LibXML/SAX/Parser.pm, avg 3µs/call # 1131 times (2.31ms+0s) by MARC::Record::_all_parms_are_fields at line 248 of MARC/Record.pm, avg 2µs/call # 633 times (955µs+0s) by XML::Simple::collapse at line 1095 of XML/Simple.pm, avg 2µs/call # 333 times (631µs+0s) by XML::Simple::collapse at line 1057 of XML/Simple.pm, avg 2µs/call # 59 times (224µs+0s) by base::import at line 80 of base.pm, avg 4µs/call # 24 times (34µs+0s) by XML::Simple::array_to_hash at line 1262 of XML/Simple.pm, avg 1µs/call # 8 times (24µs+0s) by Template::Context::process at line 331 of Template/Context.pm, avg 3µs/call # 8 times (21µs+0s) by Template::Context::process at line 373 of Template/Context.pm, avg 3µs/call # 6 times (24µs+0s) by DBI::setup_driver at line 835 of DBI.pm, avg 4µs/call # 6 times (17µs+0s) by XML::Simple::_get_object at line 141 of XML/Simple.pm, avg 3µs/call # 6 times (12µs+0s) by DBI::setup_driver at line 838 of DBI.pm, avg 2µs/call # 5 times (8µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc:32] at line 15 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc, avg 2µs/call # 4 times (17µs+0s) by CGI::self_or_CGI at line 474 of CGI.pm, avg 4µs/call # 2 times (5µs+0s) by CGI::header at line 17 of (eval 1131)[CGI.pm:869], avg 3µs/call # 2 times (2µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc:31] at line 9 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/page-numbers.inc, avg 950ns/call # once (4µs+0s) by CGI::TIEHASH at line 4 of (eval 1043)[CGI.pm:869] # once (3µs+0s) by Template::Context::template at line 87 of Template/Context.pm # once (2µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/modules/opac-results.tt:541] at line 388 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/modules/opac-results.tt # once (1µs+0s) by Template::Context::process at line 339 of Template/Context.pm # once (1µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/masthead.inc:111] at line 75 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/masthead.inc # once (1µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/modules/opac-results.tt:541] at line 389 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/modules/opac-results.tt # once (1µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc:32] at line 17 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-facets.inc # once (1µs+0s) by Template::Document::__ANON__[/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/modules/opac-results.tt:541] at line 517 of /usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/modules/opac-results.tt
sub UNIVERSAL::isa; # xsub
# spent 1.46ms within XML::LibXSLT::Stylesheet::_output_string which was called 25 times, avg 58µs/call: # 25 times (1.46ms+0s) by XML::LibXSLT::StylesheetWrapper::output_string at line 489 of XML/LibXSLT.pm, avg 58µs/call
sub XML::LibXSLT::Stylesheet::_output_string; # xsub
# spent 46.1ms within XML::LibXSLT::Stylesheet::transform which was called 25 times, avg 1.84ms/call: # 25 times (46.1ms+0s) by XML::LibXSLT::StylesheetWrapper::transform at line 462 of XML/LibXSLT.pm, avg 1.84ms/call
sub XML::LibXSLT::Stylesheet::transform; # xsub
# spent 193µs within main::CORE:match which was called 8 times, avg 24µs/call: # 2 times (127µs+0s) by main::_input_cgi_parse at line 459, avg 63µs/call # once (34µs+0s) by main::RUNTIME at line 35 # once (12µs+0s) by main::RUNTIME at line 546 # once (8µs+0s) by main::RUNTIME at line 688 # once (8µs+0s) by main::RUNTIME at line 40 # once (3µs+0s) by main::RUNTIME at line 689 # once (2µs+0s) by main::RUNTIME at line 102
sub main::CORE:match; # opcode
# spent 15µs within main::CORE:regcomp which was called: # once (15µs+0s) by main::RUNTIME at line 630
sub main::CORE:regcomp; # opcode
# spent 159µs within main::CORE:sort which was called 7 times, avg 23µs/call: # 5 times (76µs+0s) by main::RUNTIME at line 529, avg 15µs/call # once (74µs+0s) by main::RUNTIME at line 217 # once (9µs+0s) by main::RUNTIME at line 531
sub main::CORE:sort; # opcode
# spent 8µs within main::CORE:subst which was called 3 times, avg 3µs/call: # once (5µs+0s) by main::RUNTIME at line 630 # once (2µs+0s) by main::RUNTIME at line 631 # once (900ns+0s) by main::RUNTIME at line 401
sub main::CORE:subst; # opcode