mirror of
https://github.com/friendica/friendica
synced 2024-11-11 15:42:53 +00:00
Merge pull request #11082 from annando/Fix-rendertime
Fix the performance calculation for the content
This commit is contained in:
commit
e2ff48375f
2 changed files with 4 additions and 1 deletions
|
@ -707,7 +707,9 @@ class App
|
||||||
$input = array_merge($httpinput['variables'], $httpinput['files'], $request ?? $_REQUEST);
|
$input = array_merge($httpinput['variables'], $httpinput['files'], $request ?? $_REQUEST);
|
||||||
|
|
||||||
// Let the module run it's internal process (init, get, post, ...)
|
// Let the module run it's internal process (init, get, post, ...)
|
||||||
|
$timestamp = microtime(true);
|
||||||
$response = $module->run($input);
|
$response = $module->run($input);
|
||||||
|
$this->profiler->set(microtime(true) - $timestamp, 'content');
|
||||||
if ($response->getHeaderLine(ICanCreateResponses::X_HEADER) === ICanCreateResponses::TYPE_HTML) {
|
if ($response->getHeaderLine(ICanCreateResponses::X_HEADER) === ICanCreateResponses::TYPE_HTML) {
|
||||||
$page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig);
|
$page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -420,7 +420,6 @@ class Page implements ArrayAccess
|
||||||
*/
|
*/
|
||||||
$timestamp = microtime(true);
|
$timestamp = microtime(true);
|
||||||
$this->initContent($response, $mode);
|
$this->initContent($response, $mode);
|
||||||
$profiler->set(microtime(true) - $timestamp, 'content');
|
|
||||||
|
|
||||||
// Load current theme info after module has been initialized as theme could have been set in module
|
// Load current theme info after module has been initialized as theme could have been set in module
|
||||||
$currentTheme = $app->getCurrentTheme();
|
$currentTheme = $app->getCurrentTheme();
|
||||||
|
@ -448,6 +447,8 @@ class Page implements ArrayAccess
|
||||||
*/
|
*/
|
||||||
$this->initFooter($app, $mode, $l10n);
|
$this->initFooter($app, $mode, $l10n);
|
||||||
|
|
||||||
|
$profiler->set(microtime(true) - $timestamp, 'aftermath');
|
||||||
|
|
||||||
if (!$mode->isAjax()) {
|
if (!$mode->isAjax()) {
|
||||||
Hook::callAll('page_end', $this->page['content']);
|
Hook::callAll('page_end', $this->page['content']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue