Filename | /usr/share/koha/opac/cgi-bin/opac/opac-search.pl |
Statements | Executed 728 statements in 21.9ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1718 | 39 | 12 | 2.01s | 2.01s | execute (xsub) | DBI::st::
1484 | 2 | 2 | 1.40s | 1.40s | ping (xsub) | DBI::db::
161 | 1 | 1 | 155ms | 170ms | selectrow_array (xsub) | DBI::db::
11833 | 9 | 5 | 83.3ms | 83.3ms | fetchrow (xsub) | DBI::st::
2005 | 23 | 7 | 53.9ms | 91.0ms | fetchrow_hashref (xsub) | DBI::st::
25 | 1 | 1 | 46.1ms | 46.1ms | transform (xsub) | XML::LibXSLT::Stylesheet::
1653 | 41 | 12 | 23.0ms | 160ms | prepare (xsub) | DBI::db::
3306 | 55 | 13 | 20.8ms | 20.8ms | DESTROY (xsub) | DBI::common::
2011 | 27 | 9 | 19.7ms | 19.7ms | FETCH (xsub) | DBI::common::
2005 | 23 | 7 | 17.5ms | 17.5ms | fetch (xsub) | DBI::st::
1366 | 7 | 4 | 14.4ms | 14.4ms | fetchrow_array (xsub) | DBI::st::
5 | 3 | 2 | 13.6ms | 13.6ms | do (xsub) | DBI::db::
1 | 1 | 1 | 12.3ms | 49.6ms | BEGIN@48 | main::
4869 | 23 | 13 | 11.0ms | 11.0ms | isa (xsub) | UNIVERSAL::
1 | 1 | 1 | 10.4ms | 954ms | BEGIN@46 | main::
1653 | 55 | 13 | 5.49ms | 5.49ms | DESTROY (xsub) | DBD::_mem::common::
1 | 1 | 1 | 4.38ms | 232ms | BEGIN@31 | main::
1 | 1 | 1 | 3.98ms | 6.55ms | BEGIN@51 | main::
1 | 1 | 1 | 2.40ms | 65.3ms | BEGIN@45 | main::
25 | 1 | 1 | 1.46ms | 1.46ms | _output_string (xsub) | XML::LibXSLT::Stylesheet::
392 | 22 | 9 | 1.18ms | 1.18ms | can (xsub) | UNIVERSAL::
12 | 7 | 2 | 1.01ms | 1.01ms | STORE (xsub) | DBI::common::
132 | 4 | 3 | 927µs | 927µs | finish (xsub) | DBI::st::
1 | 1 | 1 | 831µs | 1.58ms | BEGIN@53 | main::
1 | 1 | 1 | 742µs | 5.34ms | BEGIN@54 | main::
28 | 3 | 3 | 607µs | 2.67ms | fetchall_arrayref (xsub) | DBI::st::
1 | 1 | 1 | 562µs | 7.33ms | BEGIN@25 | main::
268 | 1 | 1 | 422µs | 422µs | SvREADONLY (xsub) | Internals::
11 | 11 | 9 | 318µs | 318µs | VERSION (xsub) | UNIVERSAL::
268 | 9 | 5 | 276µs | 276µs | DESTROY (xsub) | Regexp::
8 | 7 | 1 | 193µs | 193µs | CORE:match (opcode) | main::
7 | 3 | 1 | 159µs | 159µs | CORE:sort (opcode) | main::
1 | 1 | 1 | 74µs | 1.50ms | selectall_arrayref (xsub) | DBI::db::
1 | 1 | 1 | 61µs | 188µs | _input_cgi_parse | main::
3 | 3 | 1 | 49µs | 70µs | interface | C4::Templates::
1 | 1 | 1 | 34µs | 8.56ms | connect (xsub) | DBI::dr::
3 | 3 | 1 | 30µs | 44µs | lang | C4::Templates::
2 | 2 | 1 | 28µs | 38µs | theme | C4::Templates::
1 | 1 | 1 | 25µs | 25µs | disconnect_all (xsub) | DBI::dr::
1 | 1 | 1 | 23µs | 653µs | BEGIN@49 | main::
1 | 1 | 1 | 21µs | 87µs | BEGIN@57 | main::
1 | 1 | 1 | 21µs | 62µs | BEGIN@47 | main::
2 | 2 | 1 | 19µs | 30µs | filename | C4::Templates::
1 | 1 | 1 | 18µs | 484µs | BEGIN@50 | main::
1 | 1 | 1 | 17µs | 191µs | BEGIN@64 | main::
1 | 1 | 1 | 17µs | 154µs | BEGIN@52 | main::
2 | 2 | 1 | 16µs | 23µs | preferredtheme | C4::Templates::
4 | 1 | 1 | 16µs | 16µs | FLAGS (xsub) | B::SV::
1 | 1 | 1 | 16µs | 78µs | BEGIN@59 | main::
1 | 1 | 1 | 16µs | 155µs | BEGIN@58 | main::
1 | 1 | 1 | 15µs | 15µs | CORE:regcomp (opcode) | main::
1 | 1 | 1 | 14µs | 92µs | BEGIN@56 | main::
1 | 1 | 1 | 12µs | 1.87ms | BEGIN@85 | main::
1 | 1 | 1 | 10µs | 10µs | connected (xsub) | DBI::db::
1 | 1 | 1 | 8µs | 8µs | CORE:match (opcode) | DBI::Const::GetInfo::ODBC::
3 | 3 | 1 | 8µs | 8µs | CORE:subst (opcode) | main::
1 | 1 | 1 | 6µs | 9µs | activethemes | C4::Templates::
1 | 1 | 1 | 5µs | 7µs | htdocs | C4::Templates::
1 | 1 | 1 | 5µs | 5µs | CORE:match (opcode) | DBI::Const::GetInfo::ANSI::
0 | 0 | 0 | 0s | 0s | RUNTIME | main::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
0 | 21 | 423µs | Profile 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 | ||
1 | 1 | 4.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 | ||||
25 | 3 | 228µs | 2 | 7.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 # 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 | ||||
31 | 3 | 304µs | 2 | 338ms | # spent 232ms (4.38+228) within main::BEGIN@31 which was called:
# once (4.38ms+228ms) by main::RUNTIME at line 31 # spent 232ms making 1 call to main::BEGIN@31
# spent 105ms making 1 call to C4::Context::import |
32 | |||||
33 | 1 | 7µs | 1 | 2.05ms | my $searchengine = C4::Context->preference("SearchEngine"); # spent 2.05ms making 1 call to C4::Context::preference |
34 | 1 | 3µs | for ( $searchengine ) { | ||
35 | 1 | 44µs | 1 | 34µ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 | } | ||||
40 | 1 | 14µs | 1 | 8µs | when ( /^Zebra$/ ) { # spent 8µs making 1 call to main::CORE:match |
41 | |||||
42 | } | ||||
43 | } | ||||
44 | |||||
45 | 3 | 183µs | 2 | 65.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 # spent 65.3ms making 1 call to main::BEGIN@45
# spent 219µs making 1 call to Exporter::import |
46 | 3 | 174µs | 2 | 954ms | # spent 954ms (10.4+943) within main::BEGIN@46 which was called:
# once (10.4ms+943ms) by main::RUNTIME at line 46 # spent 954ms making 1 call to main::BEGIN@46
# spent 334µs making 1 call to Exporter::import |
47 | 3 | 49µs | 2 | 104µs | # spent 62µs (21+42) within main::BEGIN@47 which was called:
# once (21µs+42µs) by main::RUNTIME at line 47 # spent 62µs making 1 call to main::BEGIN@47
# spent 42µs making 1 call to Exporter::import |
48 | 3 | 216µs | 2 | 49.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 # spent 49.6ms making 1 call to main::BEGIN@48
# spent 278µs making 1 call to Exporter::import |
49 | 3 | 47µs | 2 | 1.28ms | # spent 653µs (23+630) within main::BEGIN@49 which was called:
# once (23µs+630µs) by main::RUNTIME at line 49 # spent 653µs making 1 call to main::BEGIN@49
# spent 630µs making 1 call to Exporter::import |
50 | 3 | 48µs | 2 | 949µs | # spent 484µs (18+466) within main::BEGIN@50 which was called:
# once (18µs+466µs) by main::RUNTIME at line 50 # spent 484µs making 1 call to main::BEGIN@50
# spent 466µs making 1 call to Exporter::import |
51 | 3 | 196µs | 2 | 6.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 # spent 6.55ms making 1 call to main::BEGIN@51
# spent 140µs making 1 call to Exporter::import |
52 | 3 | 35µs | 2 | 291µs | # spent 154µs (17+137) within main::BEGIN@52 which was called:
# once (17µs+137µs) by main::RUNTIME at line 52 # spent 154µs making 1 call to main::BEGIN@52
# spent 137µs making 1 call to Exporter::import |
53 | 3 | 152µs | 1 | 1.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 # spent 1.58ms making 1 call to main::BEGIN@53 |
54 | 3 | 144µs | 2 | 5.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 # spent 5.34ms making 1 call to main::BEGIN@54
# spent 118µs making 1 call to Exporter::import |
55 | |||||
56 | 3 | 60µs | 2 | 169µs | # spent 92µs (14+78) within main::BEGIN@56 which was called:
# once (14µs+78µs) by main::RUNTIME at line 56 # spent 92µs making 1 call to main::BEGIN@56
# spent 78µs making 1 call to POSIX::import |
57 | 3 | 47µs | 2 | 153µs | # spent 87µs (21+66) within main::BEGIN@57 which was called:
# once (21µs+66µs) by main::RUNTIME at line 57 # spent 87µs making 1 call to main::BEGIN@57
# spent 66µs making 1 call to Exporter::import |
58 | 3 | 45µs | 2 | 295µs | # spent 155µs (16+140) within main::BEGIN@58 which was called:
# once (16µs+140µs) by main::RUNTIME at line 58 # spent 155µs making 1 call to main::BEGIN@58
# spent 140µs making 1 call to JSON::import |
59 | 3 | 58µs | 2 | 140µs | # spent 78µs (16+62) within main::BEGIN@59 which was called:
# once (16µs+62µs) by main::RUNTIME at line 59 # spent 78µs making 1 call to main::BEGIN@59
# spent 62µs making 1 call to Exporter::import |
60 | |||||
61 | 1 | 6µs | 1 | 1.91ms | my $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 | ||||
64 | 3 | 189µs | 2 | 365µs | # spent 191µs (17+174) within main::BEGIN@64 which was called:
# once (17µs+174µs) by main::RUNTIME at line 64 # spent 191µs making 1 call to main::BEGIN@64
# spent 174µs making 1 call to CGI::import |
65 | 1 | 7µs | 1 | 4.25ms | my $cgi = new CGI; # spent 4.25ms making 1 call to CGI::new |
66 | |||||
67 | 1 | 2µs | 1 | 10µs | my $branch_group_limit = $cgi->param("branch_group_limit"); # spent 10µs making 1 call to CGI::param |
68 | 1 | 400ns | if ( $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 | ||||
86 | 1 | 9µs | 1 | 1.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 | } | ||||
90 | 1 | 8.27ms | 1 | 1.87ms | } # spent 1.87ms making 1 call to main::BEGIN@85 |
91 | |||||
92 | 1 | 900ns | my ($template,$borrowernumber,$cookie); | ||
93 | 1 | 6µs | 1 | 4.23ms | my $lang = C4::Templates::getlanguage($cgi, 'opac'); # spent 4.23ms making 1 call to C4::Templates::getlanguage |
94 | # decide which template to use | ||||
95 | 1 | 300ns | my $template_name; | ||
96 | 1 | 700ns | my $template_type = 'basic'; | ||
97 | 1 | 4µs | 1 | 13µs | my @params = $cgi->param("limit"); # spent 13µs making 1 call to CGI::param |
98 | |||||
99 | |||||
100 | 1 | 3µs | 1 | 9µs | my $format = $cgi->param("format") || ''; # spent 9µs making 1 call to CGI::param |
101 | 1 | 4µs | 1 | 2.02ms | my $build_grouped_results = C4::Context->preference('OPACGroupResults'); # spent 2.02ms making 1 call to C4::Context::preference |
102 | 1 | 11µs | 2 | 21µs | if ($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 | } | ||||
105 | elsif (@params && $build_grouped_results) { | ||||
106 | $template_name = 'opac-results-grouped.tmpl'; | ||||
107 | } | ||||
108 | elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) { | ||||
109 | $template_name = 'opac-results.tmpl'; | ||||
110 | } | ||||
111 | else { | ||||
112 | $template_name = 'opac-advsearch.tmpl'; | ||||
113 | $template_type = 'advsearch'; | ||||
114 | } | ||||
115 | # load the template | ||||
116 | 1 | 24µs | 2 | 363ms | ($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 | ); | ||||
123 | 1 | 13µs | 2 | 1.80ms | if ($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 | ||||
128 | 1 | 800ns | my @cart_list; | ||
129 | |||||
130 | 1 | 7µs | 1 | 81µs | if($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 | |||||
135 | 1 | 2µs | if ($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 | } | ||||
141 | 1 | 8µs | 3 | 12µs | if (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 | } | ||||
144 | elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { | ||||
145 | $template->param('usmarc' => 1); | ||||
146 | } | ||||
147 | 1 | 10µs | 2 | 1.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 |
148 | 1 | 41µs | 2 | 2.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 | |||||
150 | 1 | 14µs | 2 | 1.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 | |||||
153 | 1 | 7µs | 1 | 9µs | if (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 | |||||
162 | 1 | 6µs | 1 | 6µs | if (C4::Context->preference('TagsEnabled')) { # spent 6µs making 1 call to C4::Context::preference |
163 | 1 | 4µs | 1 | 10µs | $template->param(TagsEnabled => 1); # spent 10µs making 1 call to C4::Templates::param |
164 | 1 | 5µs | foreach (qw(TagsShowOnList TagsInputOnList)) { | ||
165 | 2 | 20µs | 3 | 3.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 | |||||
195 | 1 | 11µs | 7 | 10.7ms | my $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 |
196 | 1 | 22µs | 5 | 1.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) | ||||
201 | 1 | 9µs | 4 | 162ms | my $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 |
202 | 1 | 8µs | 1 | 15µ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 | ||||
205 | 1 | 7µs | 4 | 3.05ms | my $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 | ||||
207 | 1 | 8µs | 1 | 11µs | my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; # spent 11µs making 1 call to C4::Context::preference |
208 | 1 | 500ns | my @advancedsearchesloop; | ||
209 | 1 | 300ns | my $cnt; | ||
210 | 1 | 4µs | 1 | 2.34ms | my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; # spent 2.34ms making 1 call to C4::Context::preference |
211 | 1 | 7µs | my @advanced_search_types = split(/\|/, $advanced_search_types); | ||
212 | |||||
213 | 1 | 3µs | foreach my $advanced_srch_type (@advanced_search_types) { | ||
214 | 3 | 13µs | if ($advanced_srch_type eq 'itemtypes') { | ||
215 | # itemtype is a special case, since it's not defined in authorized values | ||||
216 | 1 | 600ns | my @itypesloop; | ||
217 | 1 | 102µs | 1 | 74µs | foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) { # spent 74µs making 1 call to main::CORE:sort |
218 | 23 | 200µs | 23 | 2.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 | 23 | 48µs | push @itypesloop, \%row; | ||
225 | } | ||||
226 | 1 | 4µs | my %search_code = ( advanced_search_type => $advanced_srch_type, | ||
227 | code_loop => \@itypesloop ); | ||||
228 | 1 | 2µs | push @advancedsearchesloop, \%search_code; | ||
229 | } else { | ||||
230 | # covers all the other cases: non-itemtype authorized values | ||||
231 | 2 | 12µs | 2 | 5.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 | 2 | 800ns | my @authvalueloop; | ||
233 | 2 | 5µs | for my $thisitemtype (@$advsearchtypes) { | ||
234 | 26 | 508µs | 26 | 220µ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 | 26 | 75µs | push @authvalueloop, \%row; | ||
242 | } | ||||
243 | 2 | 5µs | my %search_code = ( advanced_search_type => $advanced_srch_type, | ||
244 | code_loop => \@authvalueloop ); | ||||
245 | 2 | 3µs | push @advancedsearchesloop, \%search_code; | ||
246 | } | ||||
247 | } | ||||
248 | 1 | 185µs | 1 | 188µ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 | ||||
255 | 1 | 2µs | if ( $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) | ||||
331 | 1 | 22µs | 1 | 477µs | my $params = $cgi->Vars; # spent 477µs making 1 call to CGI::AUTOLOAD |
332 | 1 | 600ns | my $tag; | ||
333 | 1 | 18µs | 1 | 315µ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 | ||||
337 | 1 | 2µs | my $pasarParams = ''; | ||
338 | 1 | 1µs | my $j = 0; | ||
339 | 1 | 144µs | 2 | 333µs | for (keys %$params) { # spent 333µs making 2 calls to CGI::AUTOLOAD, avg 166µs/call |
340 | 1 | 4µs | 1 | 17µs | my @pasarParam = $cgi->param($_); # spent 17µs making 1 call to CGI::param |
341 | 1 | 3µs | for my $paramValue(@pasarParam) { | ||
342 | 1 | 1µs | $pasarParams .= '&' if ($j > 0); | ||
343 | 1 | 700ns | $pasarParams .= $_ . '=' . $paramValue; | ||
344 | 1 | 2µs | $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 | ||||
351 | 1 | 300ns | my @sort_by; | ||
352 | 1 | 400ns | my $default_sort_by; | ||
353 | 1 | 110µs | 4 | 4.44ms | if ( 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 | |||||
360 | 1 | 6µs | my @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/; | ||
361 | 1 | 6µs | 1 | 32µs | @sort_by = $cgi->param('sort_by'); # spent 32µs making 1 call to CGI::param |
362 | 1 | 1µs | $sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by); | ||
363 | 1 | 3µs | foreach my $sort (@sort_by) { | ||
364 | 1 | 7µs | if ( $sort ~~ @allowed_sortby ) { | ||
365 | $template->param($sort => 1); | ||||
366 | } | ||||
367 | } | ||||
368 | 1 | 11µs | 1 | 14µ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) | ||||
371 | 1 | 3µs | 1 | 10µs | my @servers = $cgi->param('server'); # spent 10µs making 1 call to CGI::param |
372 | 1 | 2µs | unless (@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 | ||||
380 | 1 | 2µs | 1 | 8µs | my @operators = $cgi->param('op'); # spent 8µs making 1 call to CGI::param |
381 | 1 | 2µ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 | ||||
385 | 1 | 3µs | 1 | 8µs | my @indexes = $cgi->param('idx'); # spent 8µs making 1 call to CGI::param |
386 | 1 | 1µs | @indexes = map { uri_unescape($_) } @indexes; | ||
387 | |||||
388 | # if a simple index (only one) display the index used in the top search box | ||||
389 | 1 | 700ns | if ($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 | ||||
393 | 1 | 2µs | 1 | 13µs | my @operands = $cgi->param('q'); # spent 13µs making 1 call to CGI::param |
394 | 2 | 10µs | 1 | 20µs | @operands = map { uri_unescape($_) } @operands; # spent 20µs making 1 call to URI::Escape::uri_unescape |
395 | |||||
396 | 1 | 4µs | $template->{VARS}->{querystring} = join(' ', @operands); | ||
397 | |||||
398 | # if a simple search, display the value in the search box | ||||
399 | 1 | 2µs | if ($operands[0] && !$operands[1]) { | ||
400 | 1 | 800ns | my $ms_query = $operands[0]; | ||
401 | 1 | 8µs | 1 | 900ns | $ms_query =~ s/ #\S+//; # spent 900ns making 1 call to main::CORE:subst |
402 | 1 | 2µs | 1 | 5µ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 | ||||
406 | 1 | 3µs | 1 | 11µs | my @limits = $cgi->param('limit'); # spent 11µs making 1 call to CGI::param |
407 | 1 | 900ns | @limits = map { uri_unescape($_) } @limits; | ||
408 | |||||
409 | 1 | 12µs | 1 | 15µs | if($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 | |||||
414 | 1 | 700ns | my $available; | ||
415 | 1 | 2µs | foreach my $limit(@limits) { | ||
416 | if ($limit =~/available/) { | ||||
417 | $available = 1; | ||||
418 | } | ||||
419 | } | ||||
420 | 1 | 2µs | 1 | 6µs | $template->param(available => $available); # spent 6µs making 1 call to C4::Templates::param |
421 | |||||
422 | # append year limits if they exist | ||||
423 | 1 | 4µs | 1 | 11µs | if ($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 | ||||
437 | 1 | 4µs | 1 | 10µs | my $scan = $params->{'scan'}; # spent 10µs making 1 call to CGI::FETCH |
438 | 1 | 4µs | 1 | 2.23ms | my $count = C4::Context->preference('OPACnumSearchResults') || 20; # spent 2.23ms making 1 call to C4::Context::preference |
439 | 1 | 7µs | 1 | 2.09ms | my $countRSS = C4::Context->preference('numSearchRSSResults') || 50; # spent 2.09ms making 1 call to C4::Context::preference |
440 | 1 | 20µs | 1 | 51µs | my $results_per_page = $params->{'count'} || $count; # spent 51µs making 1 call to CGI::FETCH |
441 | 1 | 6µs | 1 | 13µs | my $offset = $params->{'offset'} || 0; # spent 13µs making 1 call to CGI::FETCH |
442 | 1 | 2µs | 1 | 9µs | my $page = $cgi->param('page') || 1; # spent 9µs making 1 call to CGI::param |
443 | 1 | 700ns | $offset = ($page-1)*$results_per_page if $page>1; | ||
444 | 1 | 400ns | my $hits; | ||
445 | 1 | 5µs | 1 | 12µs | my $expanded_facet = $params->{'expand'}; # spent 12µs making 1 call to CGI::FETCH |
446 | |||||
447 | # Define some global variables | ||||
448 | 1 | 1µs | my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type); | ||
449 | |||||
450 | 1 | 400ns | my @results; | ||
451 | |||||
452 | ## I. BUILD THE QUERY | ||||
453 | 1 | 16µs | 1 | 37.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 | ||||
456 | 1 | 700ns | my @elements; | ||
457 | 1 | 5µs | for my $this_cgi ( split('&',shift) ) { | ||
458 | 2 | 1µs | next unless $this_cgi; | ||
459 | 2 | 146µs | 2 | 127µs | $this_cgi =~ /(.*?)=(.*)/; # spent 127µs making 2 calls to main::CORE:match, avg 63µs/call |
460 | 2 | 29µs | push @elements, { input_name => $1, input_value => $2 }; | ||
461 | } | ||||
462 | 1 | 9µs | return @elements; | ||
463 | } | ||||
464 | |||||
465 | ## parse the query_cgi string and put it into a form suitable for <input>s | ||||
466 | 1 | 7µs | 1 | 188µs | my @query_inputs = _input_cgi_parse($query_cgi); # spent 188µs making 1 call to main::_input_cgi_parse |
467 | 1 | 13µs | 1 | 28µ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 | ||||
470 | 1 | 3µs | my @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 | ||||
479 | 1 | 8µs | 1 | 2.17ms | if (C4::Context->preference('OpacSuppression')) { # spent 2.17ms making 1 call to C4::Context::preference |
480 | # OPAC suppression by IP address | ||||
481 | 1 | 8µs | 1 | 1.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 | 1 | 4µs | $query = "($query) not Suppress=1"; | ||
490 | } | ||||
491 | } | ||||
492 | |||||
493 | 1 | 8µs | 1 | 14µs | $template->param ( LIMIT_INPUTS => \@limit_inputs ); # spent 14µs making 1 call to C4::Templates::param |
494 | 1 | 10µs | 2 | 1.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 | ||||
497 | 1 | 1µs | my $total = 0; # the total results for the whole set | ||
498 | 1 | 500ns | my $facets; # this object stores the faceted results that display on the left-hand of the results page | ||
499 | 1 | 500ns | my @results_array; | ||
500 | 1 | 500ns | my $results_hashref; | ||
501 | 1 | 500ns | my @coins; | ||
502 | |||||
503 | 1 | 3µs | if ($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 | 1 | 3µs | $pasarParams .= '&query=' . $query; | ||
519 | 1 | 1µs | $pasarParams .= '&count=' . $results_per_page; | ||
520 | 1 | 1µs | $pasarParams .= '&simple_query=' . $simple_query; | ||
521 | 1 | 400ns | $pasarParams .= '&query_type=' . $query_type if ($query_type); | ||
522 | 1 | 2µs | eval { | ||
523 | 1 | 13µs | 1 | 143ms | ($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 | ||||
527 | 1 | 2µs | if ($facets) { | ||
528 | 1 | 3µs | foreach my $f (@$facets) { | ||
529 | 5 | 124µs | 5 | 76µ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 | } | ||||
531 | 1 | 18µs | 1 | 9µ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); | ||||
535 | 1 | 1µs | if ($@ || $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 | ||||
543 | 1 | 800ns | my @sup_results_array; | ||
544 | 1 | 6µs | for (my $i=0;$i<@servers;$i++) { | ||
545 | 1 | 3µs | my $server = $servers[$i]; | ||
546 | 1 | 22µs | 1 | 12µs | if ($server && $server =~/biblioserver/) { # this is the local bibliographic server # spent 12µs making 1 call to main::CORE:match |
547 | 1 | 4µs | $hits = $results_hashref->{$server}->{"hits"}; | ||
548 | 1 | 10µs | 1 | 35µs | my $page = $cgi->param('page') || 0; # spent 35µs making 1 call to CGI::param |
549 | 1 | 400ns | my @newresults; | ||
550 | 1 | 4µ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 { | ||||
560 | 1 | 19µs | 7 | 4.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 | 1 | 3µs | foreach my $line (@newresults) { | ||
567 | 25 | 33µs | if ( not exists $line->{'size'} ) { $line->{'size'} = "" } | ||
568 | # while we're checking each line, see if item is in the cart | ||||
569 | 25 | 21µs | if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) { | ||
570 | $line->{'incart'} = 1; | ||||
571 | } | ||||
572 | } | ||||
573 | |||||
574 | |||||
575 | 1 | 800ns | my $tag_quantity; | ||
576 | 1 | 9µs | 2 | 11µ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 | 1 | 3µs | foreach (@newresults) { | ||
579 | 25 | 68µs | my $bibnum = $_->{biblionumber} or next; | ||
580 | 25 | 281µs | 100 | 66.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 |
581 | 25 | 554µs | 100 | 74.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 | |||||
586 | 1 | 10µs | 1 | 69µs | if (C4::Context->preference('COinSinOPACResults')) { # spent 69µs making 1 call to C4::Context::preference |
587 | 1 | 5µs | foreach (@newresults) { | ||
588 | 25 | 192µs | 100 | 580ms | 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 |
589 | 25 | 240µs | 25 | 34.9ms | $_->{coins} = GetCOinSBiblio($record); # spent 34.9ms making 25 calls to C4::Biblio::GetCOinSBiblio, avg 1.40ms/call |
590 | 25 | 1.07ms | 25 | 2.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 | |||||
608 | 1 | 7µs | 1 | 8µ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 | 1 | 9µs | if ($results_hashref->{$server}->{"hits"}){ | ||
619 | $total = $total + $results_hashref->{$server}->{"hits"}; | ||||
620 | } | ||||
621 | |||||
622 | # Opac search history | ||||
623 | 1 | 1µs | my $newsearchcookie; | ||
624 | 1 | 7µs | 1 | 8µs | if (C4::Context->preference('EnableOpacSearchHistory')) { # spent 8µs making 1 call to C4::Context::preference |
625 | 1 | 10µs | 1 | 168µs | my @recentSearches = ParseSearchHistoryCookie($cgi); # spent 168µs making 1 call to C4::Auth::ParseSearchHistoryCookie |
626 | |||||
627 | # Adding the new search if needed | ||||
628 | 1 | 26µs | 1 | 933µs | my $path_info = $cgi->url(-path_info=>1); # spent 933µs making 1 call to CGI::AUTOLOAD |
629 | 1 | 10µs | 1 | 649µs | my $query_cgi_history = $cgi->url(-query=>1); # spent 649µs making 1 call to CGI::url |
630 | 1 | 38µs | 2 | 20µ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 |
631 | 1 | 7µs | 1 | 2µs | $query_cgi_history =~ s/;/&/g; # spent 2µs making 1 call to main::CORE:subst |
632 | 1 | 47µs | my $query_desc_history = "$query_desc, $limit_desc"; | ||
633 | |||||
634 | 1 | 8µs | if (!$borrowernumber || $borrowernumber eq '') { | ||
635 | # To a cookie (the user is not logged in) | ||||
636 | 1 | 2µs | if (!$offset) { | ||
637 | 1 | 26µs | 2 | 185µ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 | }; | ||||
643 | 1 | 11µs | 1 | 21µs | $template->param(ShowOpacRecentSearchLink => 1); # spent 21µs making 1 call to C4::Templates::param |
644 | } | ||||
645 | |||||
646 | 1 | 2µs | shift @recentSearches if (@recentSearches > 15); | ||
647 | # Pushing the cookie back | ||||
648 | 1 | 33µs | 3 | 1.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 | 1 | 3µs | $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 | 1 | 2µs | 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 | } | ||||
677 | 1 | 4µs | if ($hits) { | ||
678 | 1 | 2µ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 | 1 | 3µs | $pasarParams .= '&listBiblios='; | ||
681 | 1 | 1µs | my $j = 0; | ||
682 | 1 | 3µs | foreach (@newresults) { | ||
683 | 25 | 70µs | my $bibnum = ($_->{biblionumber})?$_->{biblionumber}:0; | ||
684 | 25 | 21µs | $pasarParams .= $bibnum . ','; | ||
685 | 25 | 7µs | $j++; | ||
686 | 25 | 29µs | last if ($j == $results_per_page); | ||
687 | } | ||||
688 | 1 | 21µs | 1 | 8µs | chop $pasarParams if ($pasarParams =~ /,$/); # spent 8µs making 1 call to main::CORE:match |
689 | 1 | 12µs | 1 | 3µs | $pasarParams .= '&total=' . int($total) if ($pasarParams !~ /total=(?:[0-9]+)?/); # spent 3µs making 1 call to main::CORE:match |
690 | 1 | 70µs | 3 | 6.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 |
691 | 1 | 15µs | 2 | 2.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 |
692 | 1 | 12µs | 1 | 63µs | $session->param('busc' => $pasarParams); # spent 63µs making 1 call to CGI::Session::param |
693 | } | ||||
694 | # | ||||
695 | } | ||||
696 | 1 | 13µs | 1 | 35µs | $template->param(total => $hits); # spent 35µs making 1 call to C4::Templates::param |
697 | 1 | 1µs | my $limit_cgi_not_availablity = $limit_cgi; | ||
698 | 1 | 800ns | $limit_cgi_not_availablity =~ s/&limit=available//g if defined $limit_cgi_not_availablity; | ||
699 | 1 | 4µs | 1 | 10µs | $template->param(limit_cgi_not_availablity => $limit_cgi_not_availablity); # spent 10µs making 1 call to C4::Templates::param |
700 | 1 | 3µs | 1 | 8µs | $template->param(limit_cgi => $limit_cgi); # spent 8µs making 1 call to C4::Templates::param |
701 | 1 | 5µs | 1 | 31µs | $template->param(countrss => $countRSS ); # spent 31µs making 1 call to C4::Templates::param |
702 | 1 | 4µs | 1 | 10µs | $template->param(query_cgi => $query_cgi); # spent 10µs making 1 call to C4::Templates::param |
703 | 1 | 4µs | 1 | 10µs | $template->param(query_desc => $query_desc); # spent 10µs making 1 call to C4::Templates::param |
704 | 1 | 4µs | 1 | 8µs | $template->param(limit_desc => $limit_desc); # spent 8µs making 1 call to C4::Templates::param |
705 | 1 | 4µs | 1 | 8µs | $template->param(offset => $offset); # spent 8µs making 1 call to C4::Templates::param |
706 | 1 | 4µs | 1 | 10µs | $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold); # spent 10µs making 1 call to C4::Templates::param |
707 | 1 | 4µs | 1 | 8µs | if ($query_desc || $limit_desc) { # spent 8µs making 1 call to C4::Templates::param |
708 | $template->param(searchdesc => 1); | ||||
709 | } | ||||
710 | 1 | 1µs | $template->param(stopwords_removed => "@$stopwords_removed") if $stopwords_removed; | ||
711 | 1 | 3µs | 1 | 9µs | $template->param(results_per_page => $results_per_page); # spent 9µs making 1 call to C4::Templates::param |
712 | 1 | 11µs | 1 | 14µs | my $hide = C4::Context->preference('OpacHiddenItems'); # spent 14µs making 1 call to C4::Context::preference |
713 | 1 | 800ns | $hide = ($hide =~ m/\S/) if $hide; # Just in case it has some spaces/new lines | ||
714 | 1 | 2µs | my $branch = ''; | ||
715 | 1 | 8µs | 1 | 14µs | if (C4::Context->userenv){ # spent 14µs making 1 call to C4::Context::userenv |
716 | $branch = C4::Context->userenv->{branch}; | ||||
717 | } | ||||
718 | 1 | 5µs | 1 | 1.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( | ||||
751 | 1 | 23µs | 2 | 2.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 | ); | ||||
755 | 1 | 9µs | 1 | 10µs | if (C4::Context->preference("OPACLocalCoverImages")){ # spent 10µs making 1 call to C4::Context::preference |
756 | 1 | 4µs | 1 | 8µs | $template->param(OPACLocalCoverImages => 1); # spent 8µs making 1 call to C4::Templates::param |
757 | 1 | 16µs | 2 | 1.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 | 1 | 1µs | my @page_numbers; | ||
761 | # total number of pages there will be | ||||
762 | 1 | 62µs | 1 | 41µs | my $pages = ceil($hits / $results_per_page); # spent 41µs making 1 call to POSIX::ceil |
763 | # default page number | ||||
764 | 1 | 1µs | my $current_page_number = 1; | ||
765 | 1 | 700ns | if ($offset) { | ||
766 | $current_page_number = ( $offset / $results_per_page + 1 ); | ||||
767 | } | ||||
768 | 1 | 400ns | my $previous_page_offset; | ||
769 | 1 | 2µs | if ( $offset >= $results_per_page ) { | ||
770 | $previous_page_offset = $offset - $results_per_page; | ||||
771 | } | ||||
772 | 1 | 2µs | 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; | ||||
775 | 1 | 2µs | if ($current_page_number < 10) { | ||
776 | # just show the first 10 pages | ||||
777 | # Loop through the pages | ||||
778 | 1 | 800ns | my $pages_to_show = 10; | ||
779 | 1 | 2µs | $pages_to_show = $pages if $pages<10; | ||
780 | 1 | 16µs | for ($i=1; $i<=$pages_to_show;$i++) { | ||
781 | # the offset for this page | ||||
782 | 10 | 10µs | my $this_offset = (($i*$results_per_page)-$results_per_page); | ||
783 | # the page number for this page | ||||
784 | 10 | 4µs | my $this_page_number = $i; | ||
785 | # put it in the array | ||||
786 | 10 | 69µs | 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 | 1 | 1µs | } | ||
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 | } | ||||
812 | 1 | 8µs | 1 | 21µ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; | ||||
814 | 1 | 11µs | 1 | 9µ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' => "&idx=an&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 | ||||
853 | 1 | 6µs | 1 | 13µs | $template->param( outer_sup_results_loop => \@sup_results_array); # spent 13µs making 1 call to C4::Templates::param |
854 | 1 | 1µs | } #/end of the for loop | ||
855 | #$template->param(FEDERATED_RESULTS => \@results_array); | ||||
856 | |||||
857 | 1 | 22µs | 2 | 2.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 | |||||
867 | 1 | 6µs | 1 | 9µs | if ($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... | ||||
873 | 1 | 11µs | 1 | 1.22ms | my ($totalref, $pubshelves, $barshelves)= # spent 1.22ms making 1 call to C4::VirtualShelves::GetSomeShelfNames |
874 | C4::VirtualShelves::GetSomeShelfNames($borrowernumber,'COMBO',1); | ||||
875 | 1 | 10µs | 1 | 27µ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 | |||||
882 | 1 | 2µs | my $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 | ||||
885 | 1 | 8µs | 1 | 2.67ms | if (C4::Context->preference('GoogleIndicTransliteration')) { # spent 2.67ms making 1 call to C4::Context::preference |
886 | $template->param('GoogleIndicTransliteration' => 1); | ||||
887 | } | ||||
888 | 1 | 18µs | 1 | 2.58ms | $template->{VARS}->{'BiblioItemtypeImage'} = C4::Context->preference('BiblioItemtypeImage'); # spent 2.58ms making 1 call to C4::Context::preference |
889 | |||||
890 | 1 | 16µs | 1 | 1.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/ ); | ||||
893 | 1 | 13µs | 1 | 1.90ms | $template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews'); # spent 1.90ms making 1 call to C4::Context::preference |
894 | 1 | 15µs | 1 | 1.84ms | $template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer'); # spent 1.84ms making 1 call to C4::Context::preference |
895 | 1 | 16µs | 1 | 2.15ms | $template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults'); # spent 2.15ms making 1 call to C4::Context::preference |
896 | |||||
897 | 1 | 10µs | 1 | 20µs | $template->param( borrowernumber => $borrowernumber); # spent 20µs making 1 call to C4::Templates::param |
898 | 1 | 1.07ms | 2 | 748ms | output_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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# spent 15µs within main::CORE:regcomp which was called:
# once (15µs+0s) by main::RUNTIME at line 630 | |||||
sub main::CORE:sort; # opcode | |||||
sub main::CORE:subst; # opcode |