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

Filename/usr/share/perl5/URI/Split.pm
StatementsExecuted 150 statements in 4.32ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
137112.17ms2.17msURI::Split::::CORE:matchURI::Split::CORE:match (opcode)
137111.38ms3.55msURI::Split::::uri_splitURI::Split::uri_split
111104µs104µsURI::Split::::BEGIN@10URI::Split::BEGIN@10
11130µs37µsURI::Split::::BEGIN@3URI::Split::BEGIN@3
11117µs121µsURI::Split::::BEGIN@5URI::Split::BEGIN@5
0000s0sURI::Split::::uri_joinURI::Split::uri_join
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package URI::Split;
2
3347µs245µs
# spent 37µs (30+8) within URI::Split::BEGIN@3 which was called: # once (30µs+8µs) by C4::Koha::getitemtypeimagelocation at line 3
use strict;
# spent 37µs making 1 call to URI::Split::BEGIN@3 # spent 8µs making 1 call to strict::import
4
5391µs2225µs
# spent 121µs (17+104) within URI::Split::BEGIN@5 which was called: # once (17µs+104µs) by C4::Koha::getitemtypeimagelocation at line 5
use vars qw(@ISA @EXPORT_OK);
# spent 121µs making 1 call to URI::Split::BEGIN@5 # spent 104µs making 1 call to vars::import
611µsrequire Exporter;
7112µs@ISA = qw(Exporter);
81900ns@EXPORT_OK = qw(uri_split uri_join);
9
103613µs1104µs
# spent 104µs within URI::Split::BEGIN@10 which was called: # once (104µs+0s) by C4::Koha::getitemtypeimagelocation at line 10
use URI::Escape ();
# spent 104µs making 1 call to URI::Split::BEGIN@10
11
12
# spent 3.55ms (1.38+2.17) within URI::Split::uri_split which was called 137 times, avg 26µs/call: # 137 times (1.38ms+2.17ms) by C4::Koha::getitemtypeimagelocation at line 484 of /usr/share/koha/lib/C4/Koha.pm, avg 26µs/call
sub uri_split {
131373.55ms1372.17ms return $_[0] =~ m,(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?,;
# spent 2.17ms making 137 calls to URI::Split::CORE:match, avg 16µs/call
14}
15
16sub uri_join {
17 my($scheme, $auth, $path, $query, $frag) = @_;
18 my $uri = defined($scheme) ? "$scheme:" : "";
19 $path = "" unless defined $path;
20 if (defined $auth) {
21 $auth =~ s,([/?\#]), URI::Escape::escape_char($1),eg;
22 $uri .= "//$auth";
23 $path = "/$path" if length($path) && $path !~ m,^/,;
24 }
25 elsif ($path =~ m,^//,) {
26 $uri .= "//"; # XXX force empty auth
27 }
28 unless (length $uri) {
29 $path =~ s,(:), URI::Escape::escape_char($1),e while $path =~ m,^[^:/?\#]+:,;
30 }
31 $path =~ s,([?\#]), URI::Escape::escape_char($1),eg;
32 $uri .= $path;
33 if (defined $query) {
34 $query =~ s,(\#), URI::Escape::escape_char($1),eg;
35 $uri .= "?$query";
36 }
37 $uri .= "#$frag" if defined $frag;
38 $uri;
39}
40
4115µs1;
42
43__END__
 
# spent 2.17ms within URI::Split::CORE:match which was called 137 times, avg 16µs/call: # 137 times (2.17ms+0s) by URI::Split::uri_split at line 13, avg 16µs/call
sub URI::Split::CORE:match; # opcode