← 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:26:57 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib/UpData.pm
StatementsExecuted 11 statements in 394µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
21154µs54µsFoswiki::Contrib::MailerContrib::UpData::::newFoswiki::Contrib::MailerContrib::UpData::new
11131µs39µsFoswiki::Contrib::MailerContrib::UpData::::BEGIN@13Foswiki::Contrib::MailerContrib::UpData::BEGIN@13
11117µs35µsFoswiki::Contrib::MailerContrib::UpData::::BEGIN@14Foswiki::Contrib::MailerContrib::UpData::BEGIN@14
0000s0sFoswiki::Contrib::MailerContrib::UpData::::getParentFoswiki::Contrib::MailerContrib::UpData::getParent
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::Contrib::MailerContrib::UpData
6Object that lazy-scans topics to extract
7parent relationships.
8
9=cut
10
11package Foswiki::Contrib::MailerContrib::UpData;
12
13253µs246µs
# spent 39µs (31+7) within Foswiki::Contrib::MailerContrib::UpData::BEGIN@13 which was called: # once (31µs+7µs) by Foswiki::Contrib::MailerContrib::BEGIN@27 at line 13
use strict;
# spent 39µs making 1 call to Foswiki::Contrib::MailerContrib::UpData::BEGIN@13 # spent 7µs making 1 call to strict::import
142279µs253µs
# spent 35µs (17+18) within Foswiki::Contrib::MailerContrib::UpData::BEGIN@14 which was called: # once (17µs+18µs) by Foswiki::Contrib::MailerContrib::BEGIN@27 at line 14
use warnings;
# spent 35µs making 1 call to Foswiki::Contrib::MailerContrib::UpData::BEGIN@14 # spent 18µs making 1 call to warnings::import
15
16=begin TML
17
18---++ new($web)
19 * =$web= - Web we are building parent relationships for
20Constructor for a web; initially empty, will lazy-load as topics
21are referenced.
22
23=cut
24
25
# spent 54µs within Foswiki::Contrib::MailerContrib::UpData::new which was called 2 times, avg 27µs/call: # 2 times (54µs+0s) by Foswiki::Contrib::MailerContrib::_isSubscribedToTopic at line 165 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Contrib/MailerContrib.pm, avg 27µs/call
sub new {
26658µs my ( $class, $web ) = @_;
27 my $this = bless( { web => $web }, $class );
28
29 return $this;
30}
31
32=begin TML
33
34---++ getParent($topic) -> string
35Get the name of the parent topic of the given topic
36
37=cut
38
39sub getParent {
40 my ( $this, $topic ) = @_;
41
42 if ( !defined( $this->{parent}{$topic} ) ) {
43 my ( $meta, $text ) = Foswiki::Func::readTopic( $this->{web}, $topic );
44 my $parent = $meta->get('TOPICPARENT');
45 $this->{parent}{$topic} = $parent->{name} if $parent;
46 $this->{parent}{$topic} ||= '';
47 }
48
49 return $this->{parent}{$topic};
50}
51
5214µs1;
53__END__