Skip to content

Commit

Permalink
[HttpKernel] Dont reset start time when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed May 25, 2018
1 parent bf20260 commit 9de5014
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,22 @@ public function __clone()
*/
public function boot()
{
if ($this->debug) {
$this->startTime = microtime(true);
}

if (true === $this->booted) {
if (!$this->requestStackSize && $this->resetServices) {
if ($this->container->has('services_resetter')) {
$this->container->get('services_resetter')->reset();
}
$this->resetServices = false;
if ($this->debug) {
$this->startTime = microtime(true);
}
}

return;
}
if ($this->debug) {
$this->startTime = microtime(true);
}
if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) {
putenv('SHELL_VERBOSITY=3');
$_ENV['SHELL_VERBOSITY'] = 3;
Expand Down

0 comments on commit 9de5014

Please sign in to comment.