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

Filename/var/www/foswiki11/lib/Foswiki/Macros/VAR.pm
StatementsExecuted 341 statements in 992µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4211890µs5.24msFoswiki::::VARFoswiki::VAR
11137µs75µsFoswiki::::BEGIN@4.64Foswiki::BEGIN@4.64
11133µs55µsFoswiki::::BEGIN@5.65Foswiki::BEGIN@5.65
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
2package Foswiki;
3
4274µs2114µs
# spent 75µs (37+38) within Foswiki::BEGIN@4.64 which was called: # once (37µs+38µs) by Foswiki::_expandMacroOnTopicRendering at line 4
use strict;
# spent 75µs making 1 call to Foswiki::BEGIN@4.64 # spent 38µs making 1 call to strict::import
52221µs277µs
# spent 55µs (33+22) within Foswiki::BEGIN@5.65 which was called: # once (33µs+22µs) by Foswiki::_expandMacroOnTopicRendering at line 5
use warnings;
# spent 55µs making 1 call to Foswiki::BEGIN@5.65 # spent 22µs making 1 call to warnings::import
6
7
# spent 5.24ms (890µs+4.35) within Foswiki::VAR which was called 42 times, avg 125µs/call: # 42 times (890µs+4.35ms) by Foswiki::_expandMacroOnTopicRendering at line 3160 of /var/www/foswiki11/lib/Foswiki.pm, avg 125µs/call
sub VAR {
84235µs my ( $this, $params, $topicObject ) = @_;
94227µs my $key = $params->{_DEFAULT};
10428µs return '' unless $key;
114220µs my $web = $params->{web} || $topicObject->web;
124271µs42105µs my $topic = $topicObject->topic;
# spent 105µs making 42 calls to Foswiki::Meta::topic, avg 2µs/call
13
14 # handle %USERSWEB%-type cases
1542142µs42497µs ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic );
# spent 497µs making 42 calls to Foswiki::normalizeWebTopicName, avg 12µs/call
16
1742147µs42946µs my $webObject = Foswiki::Meta->new( $this, $web );
# spent 946µs making 42 calls to Foswiki::Meta::new, avg 23µs/call
18
19 # always return a value, even when the key isn't defined
2042244µs422.81ms return $webObject->getPreference($key) || '';
# spent 2.81ms making 42 calls to Foswiki::Meta::getPreference, avg 67µs/call
21}
22
2314µs1;
24__END__