mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 07:13:08 +02:00
Add profiler to TemplateFile and PageRender
This commit is contained in:
@@ -500,7 +500,10 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
// own additional variables in it if they want to
|
||||
$output->set('options', $options);
|
||||
|
||||
$profiler = $this->wire('profiler');
|
||||
$profilerEvent = $profiler ? $profiler->start($page->path, $this, array('page' => $page)) : null;
|
||||
$data = $output->render();
|
||||
if($profilerEvent) $profiler->stop($profilerEvent);
|
||||
}
|
||||
|
||||
if($data && $cacheAllowed && $cacheFile) $cacheFile->save($data);
|
||||
|
Reference in New Issue
Block a user