← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:09 2015

Filename/var/www/foswiki11/lib/Foswiki/Prefs/TopicRAM.pm
StatementsExecuted 16107 statements in 36.8ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
16974115.5ms22.4msFoswiki::Prefs::TopicRAM::::insertFoswiki::Prefs::TopicRAM::insert
336216.49ms9.72sFoswiki::Prefs::TopicRAM::::newFoswiki::Prefs::TopicRAM::new
1537433.54ms3.54msFoswiki::Prefs::TopicRAM::::getFoswiki::Prefs::TopicRAM::get
476111.21ms1.21msFoswiki::Prefs::TopicRAM::::getLocalFoswiki::Prefs::TopicRAM::getLocal
24422968µs968µsFoswiki::Prefs::TopicRAM::::finishFoswiki::Prefs::TopicRAM::finish
12311745µs745µsFoswiki::Prefs::TopicRAM::::prefsFoswiki::Prefs::TopicRAM::prefs
111419µs487µsFoswiki::Prefs::TopicRAM::::BEGIN@22Foswiki::Prefs::TopicRAM::BEGIN@22
61124µs24µsFoswiki::Prefs::TopicRAM::::topicObjectFoswiki::Prefs::TopicRAM::topicObject
11113µs26µsFoswiki::Prefs::TopicRAM::::BEGIN@16Foswiki::Prefs::TopicRAM::BEGIN@16
1119µs15µsFoswiki::Prefs::TopicRAM::::BEGIN@17Foswiki::Prefs::TopicRAM::BEGIN@17
1114µs4µsFoswiki::Prefs::TopicRAM::::BEGIN@19Foswiki::Prefs::TopicRAM::BEGIN@19
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
16227µs238µs
# spent 26µs (13+13) within Foswiki::Prefs::TopicRAM::BEGIN@16 which was called: # once (13µs+13µs) by Foswiki::Prefs::BEGIN@1 at line 16
use strict;
# spent 26µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@16 # spent 13µs making 1 call to strict::import
17225µs221µs
# spent 15µs (9+6) within Foswiki::Prefs::TopicRAM::BEGIN@17 which was called: # once (9µs+6µs) by Foswiki::Prefs::BEGIN@1 at line 17
use warnings;
# spent 15µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@17 # spent 6µs making 1 call to warnings::import
18
19233µs14µs
# spent 4µs within Foswiki::Prefs::TopicRAM::BEGIN@19 which was called: # once (4µs+0s) by Foswiki::Prefs::BEGIN@1 at line 19
use Foswiki::Prefs::BaseBackend ();
# spent 4µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@19
2018µsour @ISA = qw(Foswiki::Prefs::BaseBackend);
21
222323µs1487µs
# spent 487µs (419+68) within Foswiki::Prefs::TopicRAM::BEGIN@22 which was called: # once (419µs+68µs) by Foswiki::Prefs::BEGIN@1 at line 22
use Foswiki::Prefs::Parser ();
# spent 487µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@22
23
24
# spent 9.72s (6.49ms+9.72) within Foswiki::Prefs::TopicRAM::new which was called 336 times, avg 28.9ms/call: # 233 times (3.70ms+31.2ms) by Foswiki::Prefs::loadPreferences at line 232 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 150µs/call # 103 times (2.80ms+9.68s) by Foswiki::Prefs::_getBackend at line 143 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 94.0ms/call
sub new {
25336228µs my ( $proto, $topicObject ) = @_;
26
273362.56ms3361.13ms my $this = $proto->SUPER::new();
# spent 1.13ms making 336 calls to Foswiki::Prefs::BaseBackend::new, avg 3µs/call
28336452µs $this->{values} = {};
29336191µs $this->{local} = {};
30
313361.19ms6719.71s if ( $topicObject->existsInStore() ) {
# spent 9.69s making 335 calls to Foswiki::Prefs::Parser::parse, avg 28.9ms/call # spent 23.5ms making 336 calls to Foswiki::Meta::existsInStore, avg 70µs/call
32 Foswiki::Prefs::Parser::parse( $topicObject, $this );
33 }
34336315µs $this->{topicObject} = $topicObject;
35
363361.00ms return $this;
37}
38
39
# spent 968µs within Foswiki::Prefs::TopicRAM::finish which was called 244 times, avg 4µs/call: # 141 times (279µs+0s) by Foswiki::Prefs::Stack::finish at line 65 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 2µs/call # 103 times (689µs+0s) by Foswiki::Prefs::finish at line 122 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 7µs/call
sub finish {
4024452µs my $this = shift;
41244614µs undef $this->{values};
4224474µs undef $this->{local};
43244499µ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 24µs within Foswiki::Prefs::TopicRAM::topicObject which was called 6 times, avg 4µs/call: # 6 times (24µs+0s) by Foswiki::Prefs::popTopicContext at line 313 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 4µs/call
sub topicObject {
5564µs my $this = shift;
56624µs return $this->{topicObject};
57}
58
59
# spent 745µs within Foswiki::Prefs::TopicRAM::prefs which was called 123 times, avg 6µs/call: # 123 times (745µs+0s) by Foswiki::Prefs::Stack::newLevel at line 192 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 6µs/call
sub prefs {
6012357µs my $this = shift;
61123962µs return keys %{ $this->{values} };
62}
63
64sub localPrefs {
65 my $this = shift;
66 return keys %{ $this->{local} };
67}
68
69
# spent 3.54ms within Foswiki::Prefs::TopicRAM::get which was called 1537 times, avg 2µs/call: # 858 times (2.13ms+0s) by Foswiki::Prefs::Stack::getPreference at line 255 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 2µs/call # 475 times (707µs+0s) by Foswiki::Meta::getPreference at line 596 of /var/www/foswiki11/lib/Foswiki/Meta.pm, avg 1µs/call # 123 times (454µs+0s) by Foswiki::Prefs::Stack::newLevel at line 198 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 4µs/call # 81 times (244µs+0s) by Foswiki::Prefs::getPreference at line 450 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 3µs/call
sub get {
701537871µs my ( $this, $key ) = @_;
7115374.52ms return $this->{values}{$key};
72}
73
74
# spent 1.21ms within Foswiki::Prefs::TopicRAM::getLocal which was called 476 times, avg 3µs/call: # 476 times (1.21ms+0s) by Foswiki::Prefs::getPreference at line 443 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 3µs/call
sub getLocal {
75476281µs my ( $this, $key ) = @_;
764761.42ms return $this->{local}{$key};
77}
78
79
# spent 22.4ms (15.5+6.90) within Foswiki::Prefs::TopicRAM::insert which was called 1697 times, avg 13µs/call: # 875 times (8.08ms+3.69ms) by Foswiki::Prefs::Parser::parse at line 58 of /var/www/foswiki11/lib/Foswiki/Prefs/Parser.pm, avg 13µs/call # 810 times (7.32ms+3.15ms) by Foswiki::Prefs::Parser::parse at line 44 of /var/www/foswiki11/lib/Foswiki/Prefs/Parser.pm, avg 13µs/call # 9 times (56µs+42µs) by Foswiki::Prefs::Parser::parse at line 73 of /var/www/foswiki11/lib/Foswiki/Prefs/Parser.pm, avg 11µs/call # 3 times (26µs+10µs) by Foswiki::Prefs::Parser::parse at line 63 of /var/www/foswiki11/lib/Foswiki/Prefs/Parser.pm, avg 12µs/call
sub insert {
8016971.55ms my ( $this, $type, $key, $value ) = @_;
81
8216972.70ms16976.90ms $this->cleanupInsertValue( \$value );
# spent 6.90ms making 1697 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 4µs/call
83
8416971.06ms my $index = $type eq 'Set' ? 'values' : 'local';
8516973.00ms $this->{$index}{$key} = $value;
86169712.7ms return 1;
87}
88
8913µs1;
90__END__