← 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 17:10:45 2013
Reported on Tue Oct 15 17:12:10 2013

Filename/usr/share/perl5/XML/SAX/DocumentLocator.pm
StatementsExecuted 179 statements in 1.30ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2511477µs855µsXML::SAX::DocumentLocator::::newXML::SAX::DocumentLocator::new
2511377µs377µsXML::SAX::DocumentLocator::::TIEHASHXML::SAX::DocumentLocator::TIEHASH
11120µs24µsXML::SAX::DocumentLocator::::BEGIN@4XML::SAX::DocumentLocator::BEGIN@4
0000s0sXML::SAX::DocumentLocator::::CLEARXML::SAX::DocumentLocator::CLEAR
0000s0sXML::SAX::DocumentLocator::::DELETEXML::SAX::DocumentLocator::DELETE
0000s0sXML::SAX::DocumentLocator::::EXISTSXML::SAX::DocumentLocator::EXISTS
0000s0sXML::SAX::DocumentLocator::::FETCHXML::SAX::DocumentLocator::FETCH
0000s0sXML::SAX::DocumentLocator::::FIRSTKEYXML::SAX::DocumentLocator::FIRSTKEY
0000s0sXML::SAX::DocumentLocator::::NEXTKEYXML::SAX::DocumentLocator::NEXTKEY
0000s0sXML::SAX::DocumentLocator::::STOREXML::SAX::DocumentLocator::STORE
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# $Id: DocumentLocator.pm,v 1.3 2005-10-14 20:31:20 matt Exp $
2
3package XML::SAX::DocumentLocator;
43399µs229µs
# spent 24µs (20+5) within XML::SAX::DocumentLocator::BEGIN@4 which was called: # once (20µs+5µs) by XML::LibXML::SAX::Parser::BEGIN@18 at line 4
use strict;
# spent 24µs making 1 call to XML::SAX::DocumentLocator::BEGIN@4 # spent 5µs making 1 call to strict::import
5
6
# spent 855µs (477+378) within XML::SAX::DocumentLocator::new which was called 25 times, avg 34µs/call: # 25 times (477µs+378µs) by XML::LibXML::SAX::Parser::generate at line 83 of XML/LibXML/SAX/Parser.pm, avg 34µs/call
sub new {
7100424µs my $class = shift;
8 my %object;
9143µs25377µs tie %object, $class, @_;
# spent 377µs making 25 calls to XML::SAX::DocumentLocator::TIEHASH, avg 15µs/call
10
11 return bless \%object, $class;
12}
13
14
# spent 377µs within XML::SAX::DocumentLocator::TIEHASH which was called 25 times, avg 15µs/call: # 25 times (377µs+0s) by XML::SAX::DocumentLocator::new at line 9, avg 15µs/call
sub TIEHASH {
1575429µs my $class = shift;
16 my ($pubmeth, $sysmeth, $linemeth, $colmeth, $encmeth, $xmlvmeth) = @_;
17 return bless {
18 pubmeth => $pubmeth,
19 sysmeth => $sysmeth,
20 linemeth => $linemeth,
21 colmeth => $colmeth,
22 encmeth => $encmeth,
23 xmlvmeth => $xmlvmeth,
24 }, $class;
25}
26
27sub FETCH {
28 my ($self, $key) = @_;
29 my $method;
30 if ($key eq 'PublicId') {
31 $method = $self->{pubmeth};
32 }
33 elsif ($key eq 'SystemId') {
34 $method = $self->{sysmeth};
35 }
36 elsif ($key eq 'LineNumber') {
37 $method = $self->{linemeth};
38 }
39 elsif ($key eq 'ColumnNumber') {
40 $method = $self->{colmeth};
41 }
42 elsif ($key eq 'Encoding') {
43 $method = $self->{encmeth};
44 }
45 elsif ($key eq 'XMLVersion') {
46 $method = $self->{xmlvmeth};
47 }
48 if ($method) {
49 my $value = $method->($key);
50 return $value;
51 }
52 return undef;
53}
54
55sub EXISTS {
56 my ($self, $key) = @_;
57 if ($key =~ /^(PublicId|SystemId|LineNumber|ColumnNumber|Encoding|XMLVersion)$/) {
58 return 1;
59 }
60 return 0;
61}
62
63sub STORE {
64 my ($self, $key, $value) = @_;
65}
66
67sub DELETE {
68 my ($self, $key) = @_;
69}
70
71sub CLEAR {
72 my ($self) = @_;
73}
74
75sub FIRSTKEY {
76 my ($self) = @_;
77 # assignment resets.
78 $self->{keys} = {
79 PublicId => 1,
80 SystemId => 1,
81 LineNumber => 1,
82 ColumnNumber => 1,
83 Encoding => 1,
84 XMLVersion => 1,
85 };
86 return each %{$self->{keys}};
87}
88
89sub NEXTKEY {
90 my ($self, $lastkey) = @_;
91 return each %{$self->{keys}};
92}
93
9413µs1;
95__END__