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

Filename/var/www/foswikidev/core/lib/Foswiki/Plugins/RenderFormPlugin.pm
StatementsExecuted 342 statements in 844µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1114.88ms5.02msFoswiki::Plugins::RenderFormPlugin::::BEGIN@66Foswiki::Plugins::RenderFormPlugin::BEGIN@66
10811425µs425µsFoswiki::Plugins::RenderFormPlugin::::commonTagsHandlerFoswiki::Plugins::RenderFormPlugin::commonTagsHandler
11115µs159µsFoswiki::Plugins::RenderFormPlugin::::initPluginFoswiki::Plugins::RenderFormPlugin::initPlugin
11113µs27µsFoswiki::Plugins::RenderFormPlugin::::BEGIN@21Foswiki::Plugins::RenderFormPlugin::BEGIN@21
1119µs50µsFoswiki::Plugins::RenderFormPlugin::::BEGIN@23Foswiki::Plugins::RenderFormPlugin::BEGIN@23
1118µs137µsFoswiki::Plugins::RenderFormPlugin::::_requireJSCalendarContribFoswiki::Plugins::RenderFormPlugin::_requireJSCalendarContrib
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# RenderFormPlugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
2#
3# Copyright (C) 2008 Daniel Rohde
4#
5# For licensing info read LICENSE file in the Foswiki root.
6# This program is free software; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License
8# as published by the Free Software Foundation; either version 2
9# of the License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details, published at
15# http://www.gnu.org/copyleft/gpl.html
16#
17# As per the GPL, removal of this notice is prohibited.
18
19package Foswiki::Plugins::RenderFormPlugin;
20
21233µs241µs
# spent 27µs (13+14) within Foswiki::Plugins::RenderFormPlugin::BEGIN@21 which was called: # once (13µs+14µs) by Foswiki::Plugin::BEGIN@2.29 at line 21
use strict;
# spent 27µs making 1 call to Foswiki::Plugins::RenderFormPlugin::BEGIN@21 # spent 14µs making 1 call to strict::import
22
232156µs290µs
# spent 50µs (9+40) within Foswiki::Plugins::RenderFormPlugin::BEGIN@23 which was called: # once (9µs+40µs) by Foswiki::Plugin::BEGIN@2.29 at line 23
use vars qw( $VERSION $RELEASE $REVISION $debug $pluginName );
# spent 50µs making 1 call to Foswiki::Plugins::RenderFormPlugin::BEGIN@23 # spent 40µs making 1 call to vars::import
24
251700ns$VERSION = '$Rev$';
26
271200ns$RELEASE = '1.007 (18 Aug 2010)';
28
291100ns$REVISION =
30 '1.007'; #Paul Harvey# fix plugin code to only require JSCalendarContrib once
31
32#$REVISION = '1.006'; #Paul Harvey# added redirectto parameter
33#$REVISION = '1.005'; #Daniel Rohde# fixed performance problem
34#$REVISION = '1.004'; #Kenneth Lavrsen# Fixed a bug that causes JSCalendarContrib to stack overflow. Fix includes changing to official API way to add JSCalendar.
35#$REVISION = '1.003'; #Kenneth Lavrsen# Changed to Foswiki name space
36#$REVISION = '1.002'; #dro# added layout feature; fixed date field bug; added missing docs;
37#$REVISION = '1.001'; #dro# changed topicparent default; added and fixed docs; fixed date field bug; fixed non-word character in field names bug;
38#$REVISION = '1.000'; #dro# initial version
39
401200ns$pluginName = 'RenderFormPlugin';
41
42
# spent 159µs (15+144) within Foswiki::Plugins::RenderFormPlugin::initPlugin which was called: # once (15µs+144µs) by Foswiki::Plugin::__ANON__[/var/www/foswikidev/core/lib/Foswiki/Plugin.pm:257] at line 250 of /var/www/foswikidev/core/lib/Foswiki/Plugin.pm
sub initPlugin {
4311µs my ( $topic, $web, $user, $installWeb ) = @_;
44
45 # check for Plugins.pm versions
46112µs17µs if ( $Foswiki::Plugins::VERSION < 1.026 ) {
# spent 7µs making 1 call to version::vxs::VCMP
47 Foswiki::Func::writeWarning(
48 "Version mismatch between $pluginName and Plugins.pm");
49 return 0;
50 }
5113µs1137µs _requireJSCalendarContrib();
52
53 # Plugin correctly initialized
5414µs return 1;
55}
56
57
# spent 425µs within Foswiki::Plugins::RenderFormPlugin::commonTagsHandler which was called 108 times, avg 4µs/call: # 108 times (425µs+0s) by Foswiki::Plugin::invoke at line 310 of /var/www/foswikidev/core/lib/Foswiki/Plugin.pm, avg 4µs/call
sub commonTagsHandler {
58
59 # do not uncomment, use $_[0], $_[1]... instead
60 ### my ( $text, $topic, $web ) = @_;
61
6210823µs Foswiki::Func::writeDebug(
63 "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )")
64 if $debug;
65
662218µs15.02ms
# spent 5.02ms (4.88+137µs) within Foswiki::Plugins::RenderFormPlugin::BEGIN@66 which was called: # once (4.88ms+137µs) by Foswiki::Plugin::BEGIN@2.29 at line 66
use Foswiki::Plugins::RenderFormPlugin::Core;
# spent 5.02ms making 1 call to Foswiki::Plugins::RenderFormPlugin::BEGIN@66
67 $_[0] =~
6810897µss/\%RENDERFORM{(.*?)}\%/Foswiki::Plugins::RenderFormPlugin::Core::render($1,$_[1],$_[2])/ge;
69108285µs $_[0] =~ s/\%STARTRENDERFORMLAYOUT(.*?)STOPRENDERFORMLAYOUT\%//sg;
70}
71
72
# spent 137µs (8+128) within Foswiki::Plugins::RenderFormPlugin::_requireJSCalendarContrib which was called: # once (8µs+128µs) by Foswiki::Plugins::RenderFormPlugin::initPlugin at line 51
sub _requireJSCalendarContrib {
73
74 # do not uncomment, use $_[0], $_[1]... instead
75 #my $text = shift;
76 #
77 #
7814µs eval {
7911µs require Foswiki::Contrib::JSCalendarContrib;
8012µs1128µs unless ($@) {
# spent 128µs making 1 call to Foswiki::Contrib::JSCalendarContrib::addHEAD
81 Foswiki::Contrib::JSCalendarContrib::addHEAD('foswiki');
82 }
83 };
84}
85
8613µs1;