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

Filename/usr/share/perl5/YAML.pm
StatementsExecuted 386 statements in 5.24ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
32118.79ms68.9msYAML::::init_action_objectYAML::init_action_object
1111.50ms2.09msYAML::::BEGIN@7YAML::BEGIN@7
1111.39ms1.58msYAML::::BEGIN@6YAML::BEGIN@6
32111.02ms82.3msYAML::::LoadYAML::Load
11137µs37µsYAML::::BEGIN@3YAML::BEGIN@3
11117µs24µsYAML::::BEGIN@4YAML::BEGIN@4
11115µs80µsYAML::::BEGIN@15YAML::BEGIN@15
11115µs40µsYAML::::BEGIN@5YAML::BEGIN@5
11114µs38µsYAML::::BEGIN@40YAML::BEGIN@40
0000s0sYAML::::BlessYAML::Bless
0000s0sYAML::::BlessedYAML::Blessed
0000s0sYAML::::DumpYAML::Dump
0000s0sYAML::::DumpFileYAML::DumpFile
0000s0sYAML::::LoadFileYAML::LoadFile
0000s0sYAML::::global_objectYAML::global_object
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package YAML;
2
3354µs137µs
# spent 37µs within YAML::BEGIN@3 which was called: # once (37µs+0s) by C4::Search::BEGIN@34 at line 3
use 5.008001;
# spent 37µs making 1 call to YAML::BEGIN@3
4330µs232µs
# spent 24µs (17+7) within YAML::BEGIN@4 which was called: # once (17µs+7µs) by C4::Search::BEGIN@34 at line 4
use strict;
# spent 24µs making 1 call to YAML::BEGIN@4 # spent 7µs making 1 call to strict::import
5329µs264µs
# spent 40µs (15+25) within YAML::BEGIN@5 which was called: # once (15µs+25µs) by C4::Search::BEGIN@34 at line 5
use warnings;
# spent 40µs making 1 call to YAML::BEGIN@5 # spent 25µs making 1 call to warnings::import
63136µs21.63ms
# spent 1.58ms (1.39+189µs) within YAML::BEGIN@6 which was called: # once (1.39ms+189µs) by C4::Search::BEGIN@34 at line 6
use YAML::Base;
# spent 1.58ms making 1 call to YAML::BEGIN@6 # spent 57µs making 1 call to Exporter::import
73187µs22.14ms
# spent 2.09ms (1.50+590µs) within YAML::BEGIN@7 which was called: # once (1.50ms+590µs) by C4::Search::BEGIN@34 at line 7
use YAML::Node; # XXX This is a temp fix for Module::Build
# spent 2.09ms making 1 call to YAML::BEGIN@7 # spent 50µs making 1 call to Exporter::import
8
91900nsour $VERSION = '0.71';
10110µsour @ISA = 'YAML::Base';
1111µsour @EXPORT = qw{ Dump Load };
1211µsour @EXPORT_OK = qw{ freeze thaw DumpFile LoadFile Bless Blessed };
13
14# XXX This VALUE nonsense needs to go.
153158µs2146µs
# spent 80µs (15+65) within YAML::BEGIN@15 which was called: # once (15µs+65µs) by C4::Search::BEGIN@34 at line 15
use constant VALUE => "\x07YAML\x07VALUE\x07";
# spent 80µs making 1 call to YAML::BEGIN@15 # spent 65µs making 1 call to constant::import
16
17# YAML Object Properties
1813µs1346µsfield dumper_class => 'YAML::Dumper';
# spent 346µs making 1 call to YAML::Base::field
1912µs1188µsfield loader_class => 'YAML::Loader';
# spent 188µs making 1 call to YAML::Base::field
2013µs1202µsfield dumper_object =>
# spent 202µs making 1 call to YAML::Base::field
21 -init => '$self->init_action_object("dumper")';
2213µs1200µsfield loader_object =>
# spent 200µs making 1 call to YAML::Base::field
23 -init => '$self->init_action_object("loader")';
24
25sub Dump {
26 my $yaml = YAML->new;
27 $yaml->dumper_class($YAML::DumperClass)
28 if $YAML::DumperClass;
29 return $yaml->dumper_object->dump(@_);
30}
31
32
# spent 82.3ms (1.02+81.2) within YAML::Load which was called 32 times, avg 2.57ms/call: # 32 times (1.02ms+81.2ms) by C4::Items::GetHiddenItemnumbers at line 1644 of /usr/share/koha/lib/C4/Items.pm, avg 2.57ms/call
sub Load {
3396909µs32526µs my $yaml = YAML->new;
# spent 526µs making 32 calls to YAML::Base::new, avg 16µs/call
34 $yaml->loader_class($YAML::LoaderClass)
35 if $YAML::LoaderClass;
366480.7ms return $yaml->loader_object->load(@_);
# spent 69.6ms making 32 calls to YAML::Base::__ANON__[(eval 1028)[YAML/Base.pm:73]:7], avg 2.17ms/call # spent 11.1ms making 32 calls to YAML::Loader::load, avg 348µs/call
37}
38
39{
404428µs261µs
# spent 38µs (14+23) within YAML::BEGIN@40 which was called: # once (14µs+23µs) by C4::Search::BEGIN@34 at line 40
no warnings 'once';
# spent 38µs making 1 call to YAML::BEGIN@40 # spent 23µs making 1 call to warnings::unimport
41 # freeze/thaw is the API for Storable string serialization. Some
42 # modules make use of serializing packages on if they use freeze/thaw.
4312µs *freeze = \ &Dump;
4412µs *thaw = \ &Load;
45}
46
47sub DumpFile {
48 my $OUT;
49 my $filename = shift;
50 if (ref $filename eq 'GLOB') {
51 $OUT = $filename;
52 }
53 else {
54 my $mode = '>';
55 if ($filename =~ /^\s*(>{1,2})\s*(.*)$/) {
56 ($mode, $filename) = ($1, $2);
57 }
58 open $OUT, $mode, $filename
59 or YAML::Base->die('YAML_DUMP_ERR_FILE_OUTPUT', $filename, $!);
60 }
61 binmode $OUT, ':utf8'; # if $Config{useperlio} eq 'define';
62 local $/ = "\n"; # reset special to "sane"
63 print $OUT Dump(@_);
64}
65
66sub LoadFile {
67 my $IN;
68 my $filename = shift;
69 if (ref $filename eq 'GLOB') {
70 $IN = $filename;
71 }
72 else {
73 open $IN, '<', $filename
74 or YAML::Base->die('YAML_LOAD_ERR_FILE_INPUT', $filename, $!);
75 }
76 binmode $IN, ':utf8'; # if $Config{useperlio} eq 'define';
77 return Load(do { local $/; <$IN> });
78}
79
80
# spent 68.9ms (8.79+60.1) within YAML::init_action_object which was called 32 times, avg 2.15ms/call: # 32 times (8.79ms+60.1ms) by YAML::Base::__ANON__[(eval 1028)[/usr/share/perl5/YAML/Base.pm:73]:7] at line 2 of (eval 1028)[YAML/Base.pm:73], avg 2.15ms/call
sub init_action_object {
812563.27ms my $self = shift;
82 my $object_class = (shift) . '_class';
8332351µs my $module_name = $self->$object_class;
# spent 351µs making 32 calls to YAML::Base::__ANON__[(eval 1026)[YAML/Base.pm:73]:8], avg 11µs/call
84 eval "require $module_name";
# spent 448µs executing statements in 32 string evals (merged)
85 $self->die("Error in require $module_name - $@")
86 if $@ and "$@" !~ /Can't locate/;
8764504µs my $object = $self->$object_class->new;
# spent 266µs making 32 calls to YAML::Base::__ANON__[(eval 1026)[YAML/Base.pm:73]:8], avg 8µs/call # spent 239µs making 32 calls to YAML::Base::new, avg 7µs/call
8832204µs $object->set_global_options;
# spent 204µs making 32 calls to YAML::Loader::Base::set_global_options, avg 6µs/call
89 return $object;
90}
91
921800nsmy $global = {};
93sub Bless {
94 require YAML::Dumper::Base;
95 YAML::Dumper::Base::bless($global, @_)
96}
97sub Blessed {
98 require YAML::Dumper::Base;
99 YAML::Dumper::Base::blessed($global, @_)
100}
101sub global_object { $global }
102
103112µs1;
104
105__END__