← 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:11:27 2013

Filename/usr/share/perl5/YAML.pm
StatementsExecuted 386 statements in 5.08ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
321111.2ms75.3msYAML::::init_action_objectYAML::init_action_object
1111.58ms2.14msYAML::::BEGIN@7YAML::BEGIN@7
1111.28ms1.47msYAML::::BEGIN@6YAML::BEGIN@6
3211915µs87.5msYAML::::LoadYAML::Load
11144µs44µsYAML::::BEGIN@3YAML::BEGIN@3
11122µs31µsYAML::::BEGIN@4YAML::BEGIN@4
11120µs48µsYAML::::BEGIN@5YAML::BEGIN@5
11115µs73µsYAML::::BEGIN@15YAML::BEGIN@15
11112µs30µ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
3370µs144µs
# spent 44µs within YAML::BEGIN@3 which was called: # once (44µs+0s) by C4::Search::BEGIN@34 at line 3
use 5.008001;
# spent 44µs making 1 call to YAML::BEGIN@3
4347µs240µs
# spent 31µs (22+9) within YAML::BEGIN@4 which was called: # once (22µs+9µs) by C4::Search::BEGIN@34 at line 4
use strict;
# spent 31µs making 1 call to YAML::BEGIN@4 # spent 9µs making 1 call to strict::import
5341µs275µs
# spent 48µs (20+28) within YAML::BEGIN@5 which was called: # once (20µs+28µs) by C4::Search::BEGIN@34 at line 5
use warnings;
# spent 48µs making 1 call to YAML::BEGIN@5 # spent 28µs making 1 call to warnings::import
63125µs21.51ms
# spent 1.47ms (1.28+189µs) within YAML::BEGIN@6 which was called: # once (1.28ms+189µs) by C4::Search::BEGIN@34 at line 6
use YAML::Base;
# spent 1.47ms making 1 call to YAML::BEGIN@6 # spent 44µs making 1 call to Exporter::import
73167µs22.18ms
# spent 2.14ms (1.58+555µs) within YAML::BEGIN@7 which was called: # once (1.58ms+555µs) by C4::Search::BEGIN@34 at line 7
use YAML::Node; # XXX This is a temp fix for Module::Build
# spent 2.14ms making 1 call to YAML::BEGIN@7 # spent 46µs making 1 call to Exporter::import
8
91800nsour $VERSION = '0.71';
1019µsour @ISA = 'YAML::Base';
111800nsour @EXPORT = qw{ Dump Load };
1211µsour @EXPORT_OK = qw{ freeze thaw DumpFile LoadFile Bless Blessed };
13
14# XXX This VALUE nonsense needs to go.
153152µs2131µs
# spent 73µs (15+58) within YAML::BEGIN@15 which was called: # once (15µs+58µs) by C4::Search::BEGIN@34 at line 15
use constant VALUE => "\x07YAML\x07VALUE\x07";
# spent 73µs making 1 call to YAML::BEGIN@15 # spent 58µs making 1 call to constant::import
16
17# YAML Object Properties
1813µs1317µsfield dumper_class => 'YAML::Dumper';
# spent 317µs making 1 call to YAML::Base::field
1912µs1218µsfield loader_class => 'YAML::Loader';
# spent 218µs making 1 call to YAML::Base::field
2013µs1227µsfield dumper_object =>
# spent 227µs making 1 call to YAML::Base::field
21 -init => '$self->init_action_object("dumper")';
2213µs1210µsfield loader_object =>
# spent 210µ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 87.5ms (915µs+86.6) within YAML::Load which was called 32 times, avg 2.73ms/call: # 32 times (915µs+86.6ms) by C4::Items::GetHiddenItemnumbers at line 1644 of /usr/share/koha/lib/C4/Items.pm, avg 2.73ms/call
sub Load {
3396782µs32451µs my $yaml = YAML->new;
# spent 451µs making 32 calls to YAML::Base::new, avg 14µs/call
34 $yaml->loader_class($YAML::LoaderClass)
35 if $YAML::LoaderClass;
366486.2ms return $yaml->loader_object->load(@_);
# spent 75.9ms making 32 calls to YAML::Base::__ANON__[(eval 1045)[YAML/Base.pm:73]:7], avg 2.37ms/call # spent 10.3ms making 32 calls to YAML::Loader::load, avg 321µs/call
37}
38
39{
404425µs247µs
# spent 30µs (12+17) within YAML::BEGIN@40 which was called: # once (12µs+17µs) by C4::Search::BEGIN@34 at line 40
no warnings 'once';
# spent 30µs making 1 call to YAML::BEGIN@40 # spent 17µ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.
4311µs *freeze = \ &Dump;
441900ns *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 75.3ms (11.2+64.1) within YAML::init_action_object which was called 32 times, avg 2.35ms/call: # 32 times (11.2ms+64.1ms) by YAML::Base::__ANON__[(eval 1045)[/usr/share/perl5/YAML/Base.pm:73]:7] at line 2 of (eval 1045)[YAML/Base.pm:73], avg 2.35ms/call
sub init_action_object {
812563.23ms my $self = shift;
82 my $object_class = (shift) . '_class';
8332287µs my $module_name = $self->$object_class;
# spent 287µs making 32 calls to YAML::Base::__ANON__[(eval 1043)[YAML/Base.pm:73]:8], avg 9µs/call
84 eval "require $module_name";
# spent 372µs executing statements in 32 string evals (merged)
85 $self->die("Error in require $module_name - $@")
86 if $@ and "$@" !~ /Can't locate/;
8764588µs my $object = $self->$object_class->new;
# spent 320µs making 32 calls to YAML::Base::__ANON__[(eval 1043)[YAML/Base.pm:73]:8], avg 10µs/call # spent 268µs making 32 calls to YAML::Base::new, avg 8µs/call
8832161µs $object->set_global_options;
# spent 161µs making 32 calls to YAML::Loader::Base::set_global_options, avg 5µ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
103111µs1;
104
105__END__