Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/FORMFIELD.pm |
Statements | Executed 40 statements in 533µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
7 | 1 | 1 | 233µs | 30.4ms | FORMFIELD | Foswiki::
1 | 1 | 1 | 39µs | 53µs | BEGIN@4 | Foswiki::
1 | 1 | 1 | 28µs | 64µs | BEGIN@5 | Foswiki::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | package Foswiki; | ||||
3 | |||||
4 | 2 | 65µs | 2 | 66µs | # spent 53µs (39+14) within Foswiki::BEGIN@4 which was called:
# once (39µs+14µs) by Foswiki::_expandMacroOnTopicRendering at line 4 # spent 53µs making 1 call to Foswiki::BEGIN@4
# spent 14µs making 1 call to strict::import |
5 | 2 | 268µs | 2 | 100µs | # spent 64µs (28+36) within Foswiki::BEGIN@5 which was called:
# once (28µs+36µs) by Foswiki::_expandMacroOnTopicRendering at line 5 # spent 64µs making 1 call to Foswiki::BEGIN@5
# spent 36µs making 1 call to warnings::import |
6 | |||||
7 | # spent 30.4ms (233µs+30.2) within Foswiki::FORMFIELD which was called 7 times, avg 4.34ms/call:
# 7 times (233µs+30.2ms) by Foswiki::_expandMacroOnTopicRendering at line 3066 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 4.34ms/call | ||||
8 | 35 | 196µs | my ( $this, $args, $topicObject ) = @_; | ||
9 | if ( $args->{topic} ) { | ||||
10 | my $web = $args->{web} || $topicObject->web; | ||||
11 | my $topic = $args->{topic}; | ||||
12 | ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic ); | ||||
13 | $topicObject = new Foswiki::Meta( $this, $web, $topic ); | ||||
14 | } | ||||
15 | else { | ||||
16 | |||||
17 | # SMELL: horrible hack; assumes the current rev comes from the 'rev' | ||||
18 | # parameter. There has to be a better way! | ||||
19 | my $query = $this->{request}; | ||||
20 | 7 | 345µs | $args->{rev} ||= $query->param('rev') if ($query); # spent 345µs making 7 calls to Foswiki::Request::param, avg 49µs/call | ||
21 | } | ||||
22 | 14 | 29.8ms | return $this->renderer->renderFORMFIELD( $args, $topicObject ); # spent 20.3ms making 7 calls to Foswiki::renderer, avg 2.91ms/call
# spent 9.48ms making 7 calls to Foswiki::Render::renderFORMFIELD, avg 1.35ms/call | ||
23 | } | ||||
24 | |||||
25 | 1 | 5µs | 1; | ||
26 | |||||
27 | __END__ |