← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:16 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Macros/VAR.pm
StatementsExecuted 102 statements in 313µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1211169µs877µsFoswiki::::VARFoswiki::VAR
11116µs31µsFoswiki::::BEGIN@4.97Foswiki::BEGIN@4.97
11110µs15µsFoswiki::::BEGIN@5.98Foswiki::BEGIN@5.98
1114µs4µsFoswiki::::BEGIN@7.99Foswiki::BEGIN@7.99
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
4229µs246µs
# spent 31µs (16+15) within Foswiki::BEGIN@4.97 which was called: # once (16µs+15µs) by Foswiki::_expandMacroOnTopicRendering at line 4
use strict;
# spent 31µs making 1 call to Foswiki::BEGIN@4.97 # spent 15µs making 1 call to strict::import
5249µs220µs
# spent 15µs (10+5) within Foswiki::BEGIN@5.98 which was called: # once (10µs+5µs) by Foswiki::_expandMacroOnTopicRendering at line 5
use warnings;
# spent 15µs making 1 call to Foswiki::BEGIN@5.98 # spent 5µs making 1 call to warnings::import
6
7
# spent 4µs within Foswiki::BEGIN@7.99 which was called: # once (4µs+0s) by Foswiki::_expandMacroOnTopicRendering at line 12
BEGIN {
815µs if ( $Foswiki::cfg{UseLocale} ) {
9 require locale;
10 import locale();
11 }
12198µs14µs}
# spent 4µs making 1 call to Foswiki::BEGIN@7.99
13
14
# spent 877µs (169+708) within Foswiki::VAR which was called 12 times, avg 73µs/call: # 12 times (169µs+708µs) by Foswiki::_expandMacroOnTopicRendering at line 3435 of /var/www/foswikidev/core/lib/Foswiki.pm, avg 73µs/call
sub VAR {
15125µs my ( $this, $params, $topicObject ) = @_;
16125µs my $key = $params->{_DEFAULT};
17121µs return '' unless $key;
18124µs my $web = $params->{web} || $topicObject->web;
191215µs1219µs my $topic = $topicObject->topic;
# spent 19µs making 12 calls to Foswiki::Meta::topic, avg 2µs/call
20
21 # handle %USERSWEB%-type cases
221225µs1258µs ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic );
# spent 58µs making 12 calls to Foswiki::normalizeWebTopicName, avg 5µs/call
23
241225µs12117µs my $webObject = Foswiki::Meta->new( $this, $web );
# spent 117µs making 12 calls to Foswiki::Meta::new, avg 10µs/call
25
26 # always return a value, even when the key isn't defined
271248µs12514µs return $webObject->getPreference($key) || '';
# spent 514µs making 12 calls to Foswiki::Meta::getPreference, avg 43µs/call
28}
29
3012µs1;
31__END__