← 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/Contrib/MailerContrib/UpData.pm
StatementsExecuted 11 statements in 191µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11117µs30µsFoswiki::Contrib::MailerContrib::UpData::::BEGIN@13Foswiki::Contrib::MailerContrib::UpData::BEGIN@13
21116µs16µsFoswiki::Contrib::MailerContrib::UpData::::newFoswiki::Contrib::MailerContrib::UpData::new
11110µs14µ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
13230µs244µs
# spent 30µs (17+14) within Foswiki::Contrib::MailerContrib::UpData::BEGIN@13 which was called: # once (17µs+14µs) by Foswiki::Contrib::MailerContrib::BEGIN@29 at line 13
use strict;
# spent 30µs making 1 call to Foswiki::Contrib::MailerContrib::UpData::BEGIN@13 # spent 14µs making 1 call to strict::import
142140µs218µs
# spent 14µs (10+4) within Foswiki::Contrib::MailerContrib::UpData::BEGIN@14 which was called: # once (10µs+4µs) by Foswiki::Contrib::MailerContrib::BEGIN@29 at line 14
use warnings;
# spent 14µs making 1 call to Foswiki::Contrib::MailerContrib::UpData::BEGIN@14 # spent 4µ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 16µs within Foswiki::Contrib::MailerContrib::UpData::new which was called 2 times, avg 8µs/call: # 2 times (16µs+0s) by Foswiki::Contrib::MailerContrib::_isSubscribedToTopic at line 165 of /var/www/foswikidev/core/lib/Foswiki/Contrib/MailerContrib.pm, avg 8µs/call
sub new {
2622µs my ( $class, $web ) = @_;
2729µs my $this = bless( { web => $web }, $class );
28
2927µs 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
5212µs1;
53__END__