Skip to content

Commit 9de5014

Browse files
[HttpKernel] Dont reset start time when not needed
1 parent bf20260 commit 9de5014

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,22 @@ public function __clone()
102102
*/
103103
public function boot()
104104
{
105-
if ($this->debug) {
106-
$this->startTime = microtime(true);
107-
}
108-
109105
if (true === $this->booted) {
110106
if (!$this->requestStackSize && $this->resetServices) {
111107
if ($this->container->has('services_resetter')) {
112108
$this->container->get('services_resetter')->reset();
113109
}
114110
$this->resetServices = false;
111+
if ($this->debug) {
112+
$this->startTime = microtime(true);
113+
}
115114
}
116115

117116
return;
118117
}
118+
if ($this->debug) {
119+
$this->startTime = microtime(true);
120+
}
119121
if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) {
120122
putenv('SHELL_VERBOSITY=3');
121123
$_ENV['SHELL_VERBOSITY'] = 3;

0 commit comments

Comments
 (0)