From 9de5014b27feef6dc245b631b03911ca17fa40f3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 25 May 2018 17:06:28 +0200 Subject: [PATCH] [HttpKernel] Dont reset start time when not needed --- src/Symfony/Component/HttpKernel/Kernel.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 143006e4b1..948c30a495 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -102,20 +102,22 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ 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;