Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/INCLUDE.pm |
Statements | Executed 1448 statements in 14.8ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
20 | 1 | 1 | 6.63ms | 6.35s | INCLUDE (recurses: max depth 1, inclusive time 3.03s) | Foswiki::
20 | 1 | 1 | 3.47ms | 3.16s | __ANON__[:326] | Foswiki::
20 | 1 | 1 | 751µs | 35.4ms | __ANON__[:343] | Foswiki::
19 | 1 | 1 | 488µs | 1.28ms | _fixupIncludedTopic | Foswiki::
2 | 1 | 1 | 45µs | 127µs | _fixIncludeLink | Foswiki::
1 | 1 | 1 | 28µs | 38µs | BEGIN@4.31 | Foswiki::
1 | 1 | 1 | 17µs | 39µs | BEGIN@5.32 | Foswiki::
0 | 0 | 0 | 0s | 0s | _includeWarning | Foswiki::
0 | 0 | 0 | 0s | 0s | applyPatternToIncludedText | 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 | 49µs | 2 | 47µs | # spent 38µs (28+9) within Foswiki::BEGIN@4.31 which was called:
# once (28µs+9µs) by Foswiki::_expandMacroOnTopicRendering at line 4 # spent 38µs making 1 call to Foswiki::BEGIN@4.31
# spent 9µs making 1 call to strict::import |
5 | 2 | 2.45ms | 2 | 61µs | # spent 39µs (17+22) within Foswiki::BEGIN@5.32 which was called:
# once (17µs+22µs) by Foswiki::_expandMacroOnTopicRendering at line 5 # spent 39µs making 1 call to Foswiki::BEGIN@5.32
# spent 22µs making 1 call to warnings::import |
6 | |||||
7 | # applyPatternToIncludedText( $text, $pattern ) -> $text | ||||
8 | # Apply a pattern on included text to extract a subset | ||||
9 | # Package-private; used by IncludeHandlers. | ||||
10 | sub applyPatternToIncludedText { | ||||
11 | my ( $text, $pattern ) = @_; | ||||
12 | |||||
13 | $pattern = Foswiki::Sandbox::untaint( $pattern, \&validatePattern ); | ||||
14 | |||||
15 | my $ok = 0; | ||||
16 | eval { | ||||
17 | |||||
18 | # The eval acts as a try block in case there is anything evil in | ||||
19 | # the pattern. | ||||
20 | |||||
21 | # The () ensures that $1 is defined if $pattern matches | ||||
22 | # but does not capture anything | ||||
23 | if ( $text =~ m/$pattern()/is ) { | ||||
24 | $text = $1; | ||||
25 | } | ||||
26 | else { | ||||
27 | |||||
28 | # The pattern did not match, so return nothing | ||||
29 | $text = ''; | ||||
30 | } | ||||
31 | $ok = 1; | ||||
32 | }; | ||||
33 | $text = '' unless $ok; | ||||
34 | |||||
35 | return $text; | ||||
36 | } | ||||
37 | |||||
38 | # Replace web references in a topic. Called from forEachLine, applying to | ||||
39 | # each non-verbatim and non-literal line. | ||||
40 | # spent 1.28ms (488µs+795µs) within Foswiki::_fixupIncludedTopic which was called 19 times, avg 68µs/call:
# 19 times (488µs+795µs) by Foswiki::Render::forEachLine at line 1862 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Render.pm, avg 68µs/call | ||||
41 | 95 | 413µs | my ( $text, $options ) = @_; | ||
42 | |||||
43 | my $fromWeb = $options->{web}; | ||||
44 | |||||
45 | 16 | 738µs | unless ( $options->{in_noautolink} ) { | ||
46 | |||||
47 | # 'TopicName' to 'Web.TopicName' | ||||
48 | 32 | 609µs | $text =~ # spent 546µs making 16 calls to Foswiki::CORE:subst, avg 34µs/call
# spent 63µs making 16 calls to Foswiki::CORE:regcomp, avg 4µs/call | ||
49 | s#(?:^|(?<=[\s(]))($Foswiki::regex{wikiWordRegex})(?=\s|\)|$)#$fromWeb.$1#go; | ||||
50 | } | ||||
51 | |||||
52 | # Handle explicit [[]] everywhere | ||||
53 | # '[[TopicName][...]]' to '[[Web.TopicName][...]]' | ||||
54 | 2 | 11µs | 22 | 59µs | $text =~ s/\[\[([^]]+)\](?:\[([^]]+)\])?\]/ # spent 46µs making 19 calls to Foswiki::CORE:subst, avg 2µs/call
# spent 13µs making 3 calls to Foswiki::CORE:substcont, avg 4µs/call |
55 | 2 | 127µs | _fixIncludeLink( $fromWeb, $1, $2 )/geo; # spent 127µs making 2 calls to Foswiki::_fixIncludeLink, avg 63µs/call | ||
56 | |||||
57 | return $text; | ||||
58 | } | ||||
59 | |||||
60 | # Add a web reference to a [[...][...]] link in an included topic | ||||
61 | # spent 127µs (45+82) within Foswiki::_fixIncludeLink which was called 2 times, avg 63µs/call:
# 2 times (45µs+82µs) by Foswiki::_fixupIncludedTopic at line 55, avg 63µs/call | ||||
62 | 4 | 112µs | my ( $web, $link, $label ) = @_; | ||
63 | |||||
64 | # Detect absolute and relative URLs and web-qualified wikinames | ||||
65 | 2 | 3µs | 4 | 82µs | if ( $link =~ # spent 66µs making 2 calls to Foswiki::CORE:regcomp, avg 33µs/call
# spent 16µs making 2 calls to Foswiki::CORE:match, avg 8µs/call |
66 | m#^($Foswiki::regex{webNameRegex}\.|$Foswiki::regex{defaultWebNameRegex}\.|$Foswiki::regex{linkProtocolPattern}:|/)#o | ||||
67 | ) | ||||
68 | { | ||||
69 | 2 | 19µs | if ($label) { | ||
70 | return "[[$link][$label]]"; | ||||
71 | } | ||||
72 | else { | ||||
73 | return "[[$link]]"; | ||||
74 | } | ||||
75 | } | ||||
76 | elsif ( !$label ) { | ||||
77 | |||||
78 | # Must be wikiword or spaced-out wikiword (or illegal link :-/) | ||||
79 | $label = $link; | ||||
80 | } | ||||
81 | |||||
82 | # If link is only an anchor, leave it as is (Foswikitask:Item771) | ||||
83 | return "[[$link][$label]]" if $link =~ /^#/; | ||||
84 | return "[[$web.$link][$label]]"; | ||||
85 | } | ||||
86 | |||||
87 | # generate an include warning | ||||
88 | # SMELL: varying number of parameters idiotic to handle for customized $warn | ||||
89 | sub _includeWarning { | ||||
90 | my $this = shift; | ||||
91 | my $warn = shift; | ||||
92 | my $message = shift; | ||||
93 | |||||
94 | if ( $warn eq 'on' ) { | ||||
95 | return $this->inlineAlert( 'alerts', $message, @_ ); | ||||
96 | } | ||||
97 | elsif ( isTrue($warn) ) { | ||||
98 | |||||
99 | # different inlineAlerts need different argument counts | ||||
100 | my $argument = ''; | ||||
101 | if ( $message eq 'topic_not_found' ) { | ||||
102 | my ( $web, $topic ) = @_; | ||||
103 | $argument = "$web.$topic"; | ||||
104 | } | ||||
105 | else { | ||||
106 | $argument = shift; | ||||
107 | } | ||||
108 | $warn =~ s/\$topic/$argument/go if $argument; | ||||
109 | return $warn; | ||||
110 | } # else fail silently | ||||
111 | return ''; | ||||
112 | } | ||||
113 | |||||
114 | # Processes a specific instance %<nop>INCLUDE{...}% syntax. | ||||
115 | # Returns the text to be inserted in place of the INCLUDE command. | ||||
116 | # $includingTopicObject should be for the immediate parent topic in the | ||||
117 | # include hierarchy. Works for both URLs and absolute server paths. | ||||
118 | # spent 6.35s (6.63ms+6.34) within Foswiki::INCLUDE which was called 20 times, avg 317ms/call:
# 20 times (6.63ms+6.34s) by Foswiki::_expandMacroOnTopicRendering at line 3066 of /usr/local/src/github.com/foswiki/core/lib/Foswiki.pm, avg 317ms/call | ||||
119 | 640 | 5.43ms | my ( $this, $params, $includingTopicObject ) = @_; | ||
120 | |||||
121 | # remember args for the key before mangling the params | ||||
122 | 20 | 1.71ms | my $args = $params->stringify(); # spent 1.71ms making 20 calls to Foswiki::Attrs::stringify, avg 86µs/call | ||
123 | |||||
124 | # Remove params, so they don't get expanded in the included page | ||||
125 | my %control; | ||||
126 | for my $p (qw(_DEFAULT pattern rev section raw warn)) { | ||||
127 | 120 | 929µs | 120 | 1.13ms | $control{$p} = $params->remove($p); # spent 1.13ms making 120 calls to Foswiki::Attrs::remove, avg 9µs/call |
128 | } | ||||
129 | |||||
130 | 18 | 2.16ms | $control{warn} ||= $this->{prefs}->getPreference('INCLUDEWARNING'); # spent 2.16ms making 18 calls to Foswiki::Prefs::getPreference, avg 120µs/call | ||
131 | |||||
132 | # make sure we have something to include. If we don't do this, then | ||||
133 | # normalizeWebTopicName will default to WebHome. TWikibug:Item2209. | ||||
134 | unless ( $control{_DEFAULT} ) { | ||||
135 | return $this->_includeWarning( $control{warn}, 'bad_include_path', '' ); | ||||
136 | } | ||||
137 | |||||
138 | # Filter out '..' from path to prevent includes of '../../file' | ||||
139 | 20 | 53µs | if ( $Foswiki::cfg{DenyDotDotInclude} && $control{_DEFAULT} =~ /\.\./ ) { # spent 53µs making 20 calls to Foswiki::CORE:match, avg 3µs/call | ||
140 | return $this->_includeWarning( $control{warn}, 'bad_include_path', | ||||
141 | $control{_DEFAULT} ); | ||||
142 | } | ||||
143 | |||||
144 | # no sense in considering an empty string as an unfindable section | ||||
145 | delete $control{section} | ||||
146 | if ( defined( $control{section} ) && $control{section} eq '' ); | ||||
147 | $control{raw} ||= ''; | ||||
148 | 20 | 153µs | $control{inWeb} = $includingTopicObject->web; # spent 153µs making 20 calls to Foswiki::Meta::web, avg 8µs/call | ||
149 | 20 | 144µs | $control{inTopic} = $includingTopicObject->topic; # spent 144µs making 20 calls to Foswiki::Meta::topic, avg 7µs/call | ||
150 | |||||
151 | # Protocol links e.g. http:, https:, doc: | ||||
152 | 20 | 40µs | if ( $control{_DEFAULT} =~ /^([a-z]+):/ ) { # spent 40µs making 20 calls to Foswiki::CORE:match, avg 2µs/call | ||
153 | my $handler = $1; | ||||
154 | eval 'use Foswiki::IncludeHandlers::' . $handler . ' ()'; | ||||
155 | if ($@) { | ||||
156 | return $this->_includeWarning( $control{warn}, 'bad_include_path', | ||||
157 | $control{_DEFAULT} ); | ||||
158 | } | ||||
159 | else { | ||||
160 | $handler = 'Foswiki::IncludeHandlers::' . $handler; | ||||
161 | return $handler->INCLUDE( $this, \%control, $params ); | ||||
162 | } | ||||
163 | } | ||||
164 | |||||
165 | # No protocol handler; must be a topic reference | ||||
166 | |||||
167 | my $text = ''; | ||||
168 | my $includedWeb; | ||||
169 | my $includedTopic = $control{_DEFAULT}; | ||||
170 | 20 | 36µs | $includedTopic =~ s/\.txt$//; # strip optional (undocumented) .txt # spent 36µs making 20 calls to Foswiki::CORE:subst, avg 2µs/call | ||
171 | |||||
172 | 40 | 1.27ms | ( $includedWeb, $includedTopic ) = # spent 1.11ms making 20 calls to Foswiki::normalizeWebTopicName, avg 56µs/call
# spent 155µs making 20 calls to Foswiki::Meta::web, avg 8µs/call | ||
173 | $this->normalizeWebTopicName( $includingTopicObject->web, | ||||
174 | $includedTopic ); | ||||
175 | |||||
176 | 20 | 551µs | if ( !Foswiki::isValidTopicName( $includedTopic, 1 ) ) { # spent 551µs making 20 calls to Foswiki::isValidTopicName, avg 28µs/call | ||
177 | return $this->_includeWarning( $control{warn}, 'bad_include_path', | ||||
178 | $control{_DEFAULT} ); | ||||
179 | } | ||||
180 | |||||
181 | # See Codev.FailedIncludeWarning for the history. | ||||
182 | 20 | 2.70ms | unless ( $this->{store}->topicExists( $includedWeb, $includedTopic ) ) { # spent 2.70ms making 20 calls to Foswiki::Store::VC::Store::topicExists, avg 135µs/call | ||
183 | return _includeWarning( $this, $control{warn}, 'topic_not_found', | ||||
184 | $includedWeb, $includedTopic ); | ||||
185 | } | ||||
186 | |||||
187 | # prevent recursive includes. Note that the inclusion of a topic into | ||||
188 | # itself is not blocked; however subsequent attempts to include the | ||||
189 | # topic will fail. There is a hard block of 99 on any recursive include. | ||||
190 | 40 | 289µs | my $key = $includingTopicObject->web . '.' . $includingTopicObject->topic; # spent 148µs making 20 calls to Foswiki::Meta::web, avg 7µs/call
# spent 141µs making 20 calls to Foswiki::Meta::topic, avg 7µs/call | ||
191 | 20 | 38µs | my $count = grep( $key, keys %{ $this->{_INCLUDES} } ); | ||
192 | $key .= $args; | ||||
193 | if ( $this->{_INCLUDES}->{$key} || $count > 99 ) { | ||||
194 | return _includeWarning( $this, $control{warn}, 'already_included', | ||||
195 | "$includedWeb.$includedTopic", '' ); | ||||
196 | } | ||||
197 | |||||
198 | # Push the topic context to the included topic, so we can create | ||||
199 | # local (SESSION) macro definitions without polluting the including | ||||
200 | # topic namespace. | ||||
201 | 20 | 35.7ms | $this->{prefs}->pushTopicContext( $this->{webName}, $this->{topicName} ); # spent 35.7ms making 20 calls to Foswiki::Prefs::pushTopicContext, avg 1.79ms/call | ||
202 | |||||
203 | $this->{_INCLUDES}->{$key} = 1; | ||||
204 | |||||
205 | 20 | 6.09s | my $includedTopicObject = # spent 6.09s making 20 calls to Foswiki::Meta::load, avg 305ms/call | ||
206 | Foswiki::Meta->load( $this, $includedWeb, $includedTopic, $control{rev} ); | ||||
207 | 20 | 37.2ms | unless ( $includedTopicObject->haveAccess('VIEW') ) { # spent 37.2ms making 20 calls to Foswiki::Meta::haveAccess, avg 1.86ms/call | ||
208 | if ( isTrue( $control{warn} ) ) { | ||||
209 | return $this->inlineAlert( 'alerts', 'access_denied', | ||||
210 | "[[$includedWeb.$includedTopic]]" ); | ||||
211 | } # else fail silently | ||||
212 | return ''; | ||||
213 | } | ||||
214 | 20 | 329µs | my $memWeb = $this->{prefs}->getPreference('INCLUDINGWEB'); # spent 329µs making 20 calls to Foswiki::Prefs::getPreference, avg 16µs/call | ||
215 | 20 | 160µs | my $memTopic = $this->{prefs}->getPreference('INCLUDINGTOPIC'); # spent 160µs making 20 calls to Foswiki::Prefs::getPreference, avg 8µs/call | ||
216 | |||||
217 | my $dirtyAreas = {}; | ||||
218 | # spent 3.16s (3.47ms+3.16) within Foswiki::__ANON__[/usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/INCLUDE.pm:326] which was called 20 times, avg 158ms/call:
# 20 times (3.47ms+3.16s) by Error::subs::try at line 416 of Error.pm, avg 158ms/call | ||||
219 | |||||
220 | # Copy params into session level preferences. That way finalisation | ||||
221 | # will apply to them. These preferences will be popped when the topic | ||||
222 | # context is restored after the include. | ||||
223 | 220 | 2.26ms | 20 | 5.80ms | $this->{prefs}->setSessionPreferences(%$params); # spent 5.80ms making 20 calls to Foswiki::Prefs::setSessionPreferences, avg 290µs/call |
224 | |||||
225 | # Set preferences that finalisation does *not* apply to | ||||
226 | 60 | 947µs | $this->{prefs}->setInternalPreferences( # spent 630µs making 20 calls to Foswiki::Prefs::setInternalPreferences, avg 31µs/call
# spent 173µs making 20 calls to Foswiki::Meta::web, avg 9µs/call
# spent 144µs making 20 calls to Foswiki::Meta::topic, avg 7µs/call | ||
227 | INCLUDINGWEB => $includingTopicObject->web, | ||||
228 | INCLUDINGTOPIC => $includingTopicObject->topic | ||||
229 | ); | ||||
230 | |||||
231 | 20 | 480µs | $text = $includedTopicObject->text; # spent 480µs making 20 calls to Foswiki::Meta::text, avg 24µs/call | ||
232 | |||||
233 | # Simplify leading, and remove trailing, newlines. If we don't remove | ||||
234 | # trailing, it becomes impossible to %INCLUDE a topic into a table. | ||||
235 | 20 | 132µs | $text =~ s/^[\r\n]+/\n/; # spent 132µs making 20 calls to Foswiki::CORE:subst, avg 7µs/call | ||
236 | 20 | 464µs | $text =~ s/[\r\n]+$//; # spent 464µs making 20 calls to Foswiki::CORE:subst, avg 23µs/call | ||
237 | |||||
238 | # remove everything before and after the default include block unless | ||||
239 | # a section is explicitly defined | ||||
240 | 20 | 194µs | if ( !$control{section} ) { | ||
241 | 10 | 42µs | $text =~ s/.*?%STARTINCLUDE%//s; # spent 42µs making 10 calls to Foswiki::CORE:subst, avg 4µs/call | ||
242 | 10 | 31µs | $text =~ s/%STOPINCLUDE%.*//s; # spent 31µs making 10 calls to Foswiki::CORE:subst, avg 3µs/call | ||
243 | } | ||||
244 | |||||
245 | # prevent dirty areas in included topics from being parsed | ||||
246 | $text = takeOutBlocks( $text, 'dirtyarea', $dirtyAreas ) | ||||
247 | if $Foswiki::cfg{Cache}{Enabled}; | ||||
248 | |||||
249 | # handle sections | ||||
250 | 20 | 11.1ms | my ( $ntext, $sections ) = parseSections($text); # spent 11.1ms making 20 calls to Foswiki::parseSections, avg 553µs/call | ||
251 | |||||
252 | my $interesting = ( defined $control{section} ); | ||||
253 | 20 | 36µs | if ( $interesting || scalar(@$sections) ) { | ||
254 | |||||
255 | # Rebuild the text from the interesting sections | ||||
256 | $text = ''; | ||||
257 | foreach my $s (@$sections) { | ||||
258 | 50 | 232µs | if ( $control{section} | ||
259 | && $s->{type} eq 'section' | ||||
260 | && $s->{name} eq $control{section} ) | ||||
261 | { | ||||
262 | $text .= | ||||
263 | substr( $ntext, $s->{start}, $s->{end} - $s->{start} ); | ||||
264 | $interesting = 1; | ||||
265 | last; | ||||
266 | } | ||||
267 | elsif ( $s->{type} eq 'include' && !$control{section} ) { | ||||
268 | $text .= | ||||
269 | substr( $ntext, $s->{start}, $s->{end} - $s->{start} ); | ||||
270 | $interesting = 1; | ||||
271 | } | ||||
272 | } | ||||
273 | } | ||||
274 | |||||
275 | 140 | 1.01ms | if ( $interesting and ( length($text) eq 0 ) ) { | ||
276 | $text = | ||||
277 | _includeWarning( $this, $control{warn}, 'topic_section_not_found', | ||||
278 | $includedWeb, $includedTopic, $control{section} ); | ||||
279 | } | ||||
280 | else { | ||||
281 | |||||
282 | # If there were no interesting sections, restore the whole text | ||||
283 | $text = $ntext unless $interesting; | ||||
284 | |||||
285 | $text = applyPatternToIncludedText( $text, $control{pattern} ) | ||||
286 | if ( $control{pattern} ); | ||||
287 | |||||
288 | # Do not show TOC in included topic if TOC_HIDE_IF_INCLUDED | ||||
289 | # preference has been set | ||||
290 | 40 | 4.30ms | if ( isTrue( $this->{prefs}->getPreference('TOC_HIDE_IF_INCLUDED') ) # spent 3.08ms making 20 calls to Foswiki::Prefs::getPreference, avg 154µs/call
# spent 1.22ms making 20 calls to Foswiki::isTrue, avg 61µs/call | ||
291 | ) | ||||
292 | { | ||||
293 | $text =~ s/%TOC(?:{(.*?)})?%//g; | ||||
294 | } | ||||
295 | |||||
296 | 20 | 0s | $this->innerExpandMacros( \$text, $includedTopicObject ); # spent 3.12s making 20 calls to Foswiki::innerExpandMacros, avg 156ms/call, recursion: max depth 2, sum of overlapping time 3.12s | ||
297 | |||||
298 | # 4th parameter tells plugin that its called for an included file | ||||
299 | 20 | 5.50ms | $this->{plugins} # spent 5.50ms making 20 calls to Foswiki::Plugins::dispatch, avg 275µs/call | ||
300 | ->dispatch( 'commonTagsHandler', $text, $includedTopic, | ||||
301 | $includedWeb, 1, $includedTopicObject ); | ||||
302 | |||||
303 | # We have to expand tags again, because a plugin may have inserted | ||||
304 | # additional tags. | ||||
305 | 20 | 0s | $this->innerExpandMacros( \$text, $includedTopicObject ); # spent 3.59ms making 20 calls to Foswiki::innerExpandMacros, avg 180µs/call, recursion: max depth 2, sum of overlapping time 3.59ms | ||
306 | |||||
307 | # If needed, fix all 'TopicNames' to 'Web.TopicNames' to get the | ||||
308 | # right context so that links continue to work properly | ||||
309 | 12 | 160µs | 20 | 164µs | if ( $includedWeb ne $includingTopicObject->web ) { # spent 164µs making 20 calls to Foswiki::Meta::web, avg 8µs/call |
310 | my $removed = {}; | ||||
311 | |||||
312 | 8 | 3.22ms | $text = $this->renderer->forEachLine( # spent 3.16ms making 4 calls to Foswiki::Render::forEachLine, avg 790µs/call
# spent 55µs making 4 calls to Foswiki::renderer, avg 14µs/call | ||
313 | $text, | ||||
314 | \&_fixupIncludedTopic, | ||||
315 | { | ||||
316 | web => $includedWeb, | ||||
317 | pre => 1, | ||||
318 | noautolink => 1 | ||||
319 | } | ||||
320 | ); | ||||
321 | |||||
322 | # handle tags again because of plugin hook | ||||
323 | 4 | 0s | innerExpandMacros( $this, \$text, $includedTopicObject ); # spent 754µs making 4 calls to Foswiki::innerExpandMacros, avg 188µs/call, recursion: max depth 1, sum of overlapping time 754µs | ||
324 | } | ||||
325 | } | ||||
326 | } | ||||
327 | # spent 35.4ms (751µs+34.6) within Foswiki::__ANON__[/usr/local/src/github.com/foswiki/core/lib/Foswiki/Macros/INCLUDE.pm:343] which was called 20 times, avg 1.77ms/call:
# 20 times (751µs+34.6ms) by Error::subs::try at line 430 of Error.pm, avg 1.77ms/call | ||||
328 | |||||
329 | # always restore the context, even in the event of an error | ||||
330 | 80 | 672µs | delete $this->{_INCLUDES}->{$key}; | ||
331 | |||||
332 | 20 | 438µs | $this->{prefs}->setInternalPreferences( # spent 438µs making 20 calls to Foswiki::Prefs::setInternalPreferences, avg 22µs/call | ||
333 | INCLUDINGWEB => $memWeb, | ||||
334 | INCLUDINGTOPIC => $memTopic | ||||
335 | ); | ||||
336 | |||||
337 | # restoring dirty areas | ||||
338 | putBackBlocks( \$text, $dirtyAreas, 'dirtyarea' ) | ||||
339 | if $Foswiki::cfg{Cache}{Enabled}; | ||||
340 | |||||
341 | 20 | 34.2ms | ( $this->{webName}, $this->{topicName} ) = # spent 34.2ms making 20 calls to Foswiki::Prefs::popTopicContext, avg 1.71ms/call | ||
342 | $this->{prefs}->popTopicContext(); | ||||
343 | 40 | 320µs | }; # spent 320µs making 20 calls to Error::subs::finally, avg 16µs/call
# spent 3.20s making 20 calls to Error::subs::try, avg 160ms/call, recursion: max depth 2, sum of overlapping time 3.20s | ||
344 | |||||
345 | return $text; | ||||
346 | } | ||||
347 | |||||
348 | 1 | 5µs | 1; | ||
349 | __END__ |