← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:27:09 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/TopicRAM.pm
StatementsExecuted 3359 statements in 14.3ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
225313.96ms9.00msFoswiki::Prefs::TopicRAM::::insertFoswiki::Prefs::TopicRAM::insert
517113.23ms3.23msFoswiki::Prefs::TopicRAM::::getLocalFoswiki::Prefs::TopicRAM::getLocal
42212.19ms61.1sFoswiki::Prefs::TopicRAM::::newFoswiki::Prefs::TopicRAM::new
283432.06ms2.06msFoswiki::Prefs::TopicRAM::::getFoswiki::Prefs::TopicRAM::get
111884µs1.02msFoswiki::Prefs::TopicRAM::::BEGIN@22Foswiki::Prefs::TopicRAM::BEGIN@22
4811577µs577µsFoswiki::Prefs::TopicRAM::::prefsFoswiki::Prefs::TopicRAM::prefs
4011244µs244µsFoswiki::Prefs::TopicRAM::::topicObjectFoswiki::Prefs::TopicRAM::topicObject
1633232µs232µsFoswiki::Prefs::TopicRAM::::finishFoswiki::Prefs::TopicRAM::finish
11126µs38µsFoswiki::Prefs::TopicRAM::::BEGIN@16Foswiki::Prefs::TopicRAM::BEGIN@16
11119µs19µsFoswiki::Prefs::TopicRAM::::BEGIN@19Foswiki::Prefs::TopicRAM::BEGIN@19
11117µs37µsFoswiki::Prefs::TopicRAM::::BEGIN@17Foswiki::Prefs::TopicRAM::BEGIN@17
0000s0sFoswiki::Prefs::TopicRAM::::localPrefsFoswiki::Prefs::TopicRAM::localPrefs
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2
3=begin TML
4
5---+ package Foswiki::Prefs::TopicRAM
6
7This is a preference backend used to get preferences defined in a topic.
8
9=cut
10
11# See documentation on Foswiki::Prefs::BaseBackend to get details about the
12# methods.
13
14package Foswiki::Prefs::TopicRAM;
15
16247µs250µs
# spent 38µs (26+12) within Foswiki::Prefs::TopicRAM::BEGIN@16 which was called: # once (26µs+12µs) by Foswiki::Prefs::BEGIN@1 at line 16
use strict;
# spent 38µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@16 # spent 12µs making 1 call to strict::import
17254µs257µs
# spent 37µs (17+20) within Foswiki::Prefs::TopicRAM::BEGIN@17 which was called: # once (17µs+20µs) by Foswiki::Prefs::BEGIN@1 at line 17
use warnings;
# spent 37µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@17 # spent 20µs making 1 call to warnings::import
18
19272µs119µs
# spent 19µs within Foswiki::Prefs::TopicRAM::BEGIN@19 which was called: # once (19µs+0s) by Foswiki::Prefs::BEGIN@1 at line 19
use Foswiki::Prefs::BaseBackend ();
# spent 19µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@19
20111µsour @ISA = qw(Foswiki::Prefs::BaseBackend);
21
222637µs11.02ms
# spent 1.02ms (884µs+135µs) within Foswiki::Prefs::TopicRAM::BEGIN@22 which was called: # once (884µs+135µs) by Foswiki::Prefs::BEGIN@1 at line 22
use Foswiki::Prefs::Parser ();
# spent 1.02ms making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@22
23
24
# spent 61.1s (2.19ms+61.1) within Foswiki::Prefs::TopicRAM::new which was called 42 times, avg 1.45s/call: # 35 times (1.87ms+32.9ms) by Foswiki::Prefs::loadPreferences at line 231 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 993µs/call # 7 times (319µs+61.0s) by Foswiki::Prefs::_getBackend at line 142 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 8.72s/call
sub new {
2542120µs my ( $proto, $topicObject ) = @_;
26
2742622µs42574µs my $this = $proto->SUPER::new();
# spent 574µs making 42 calls to Foswiki::Prefs::BaseBackend::new, avg 14µs/call
2842161µs $this->{values} = {};
294294µs $this->{local} = {};
30
3142374µs426.96ms if ( $topicObject->existsInStore() ) {
# spent 6.96ms making 42 calls to Foswiki::Meta::existsInStore, avg 166µs/call
3242285µs4261.1s Foswiki::Prefs::Parser::parse( $topicObject, $this );
# spent 61.1s making 42 calls to Foswiki::Prefs::Parser::parse, avg 1.45s/call
33 }
3442135µs $this->{topicObject} = $topicObject;
35
3642270µs return $this;
37}
38
39
# spent 232µs within Foswiki::Prefs::TopicRAM::finish which was called 16 times, avg 15µs/call: # 8 times (119µs+0s) by Foswiki::Prefs::Stack::finish at line 65 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 15µs/call # 7 times (102µs+0s) by Foswiki::Prefs::finish at line 122 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 15µs/call # once (11µs+0s) by Foswiki::Meta::unload at line 510 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm
sub finish {
401649µs my $this = shift;
411692µs undef $this->{values};
421626µs undef $this->{local};
431697µs undef $this->{topicObject};
44}
45
46=begin TML
47
48---++ ObjectMethod topicObject() -> $topicObject
49
50Accessor to the topicObject used to create this object.
51
52=cut
53
54
# spent 244µs within Foswiki::Prefs::TopicRAM::topicObject which was called 40 times, avg 6µs/call: # 40 times (244µs+0s) by Foswiki::Prefs::popTopicContext at line 309 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 6µs/call
sub topicObject {
554065µs my $this = shift;
5640231µs return $this->{topicObject};
57}
58
59
# spent 577µs within Foswiki::Prefs::TopicRAM::prefs which was called 48 times, avg 12µs/call: # 48 times (577µs+0s) by Foswiki::Prefs::Stack::newLevel at line 192 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 12µs/call
sub prefs {
604873µs my $this = shift;
6196609µs return keys %{ $this->{values} };
62}
63
64sub localPrefs {
65 my $this = shift;
66 return keys %{ $this->{local} };
67}
68
69
# spent 2.06ms within Foswiki::Prefs::TopicRAM::get which was called 283 times, avg 7µs/call: # 117 times (877µs+0s) by Foswiki::Prefs::getPreference at line 445 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 7µs/call # 78 times (558µs+0s) by Foswiki::Meta::getPreference at line 662 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 7µs/call # 48 times (338µs+0s) by Foswiki::Prefs::Stack::newLevel at line 198 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 7µs/call # 40 times (289µs+0s) by Foswiki::Prefs::Stack::getPreference at line 255 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 7µs/call
sub get {
70283585µs my ( $this, $key ) = @_;
712831.86ms return $this->{values}{$key};
72}
73
74
# spent 3.23ms within Foswiki::Prefs::TopicRAM::getLocal which was called 517 times, avg 6µs/call: # 517 times (3.23ms+0s) by Foswiki::Prefs::getPreference at line 439 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 6µs/call
sub getLocal {
75517924µs my ( $this, $key ) = @_;
765172.94ms return $this->{local}{$key};
77}
78
79
# spent 9.00ms (3.96+5.04) within Foswiki::Prefs::TopicRAM::insert which was called 225 times, avg 40µs/call: # 124 times (2.20ms+2.77ms) by Foswiki::Prefs::Parser::parse at line 58 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm, avg 40µs/call # 84 times (1.46ms+1.84ms) by Foswiki::Prefs::Parser::parse at line 45 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm, avg 39µs/call # 17 times (303µs+434µs) by Foswiki::Prefs::Parser::parse at line 73 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm, avg 43µs/call
sub insert {
80225511µs my ( $this, $type, $key, $value ) = @_;
81
822251.16ms2255.04ms $this->cleanupInsertValue( \$value );
# spent 5.04ms making 225 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 22µs/call
83
84225382µs my $index = $type eq 'Set' ? 'values' : 'local';
85225732µs $this->{$index}{$key} = $value;
862251.12ms return 1;
87}
88
8916µs1;
90__END__