From 383cccc8fd4e1c250283b64cfd6367ac20ba9cc9 Mon Sep 17 00:00:00 2001
From: Matthieu Napoli <matthieu@mnapoli.fr>
Date: Mon, 2 Feb 2015 16:55:50 +1300
Subject: [PATCH] Removed the timing of the whole page which wasn't used
 anymore

---
 core/FrontController.php                   | 2 --
 core/View.php                              | 7 -------
 plugins/VisitsSummary/templates/index.twig | 7 -------
 3 files changed, 16 deletions(-)

diff --git a/core/FrontController.php b/core/FrontController.php
index d4f290e721..9accdfd9fc 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -310,8 +310,6 @@ class FrontController extends Singleton
         }
         $initialized = true;
 
-        Registry::set('timer', new Timer);
-
         $exceptionToThrow = self::createConfigObject();
 
         $tmpPath = StaticContainer::get('path.tmp');
diff --git a/core/View.php b/core/View.php
index 9a31220731..6c8244c548 100644
--- a/core/View.php
+++ b/core/View.php
@@ -237,13 +237,6 @@ class View implements ViewInterface
             // can fail, for example at installation (no plugin loaded yet)
         }
 
-        try {
-            $this->totalTimeGeneration = Registry::get('timer')->getTime();
-            $this->totalNumberOfQueries = Profiler::getQueryCount();
-        } catch (Exception $e) {
-            $this->totalNumberOfQueries = 0;
-        }
-
         ProxyHttp::overrideCacheControlHeaders('no-store');
 
         Common::sendHeader('Content-Type: ' . $this->contentType);
diff --git a/plugins/VisitsSummary/templates/index.twig b/plugins/VisitsSummary/templates/index.twig
index 2f4199f02e..d90e1bbd9c 100644
--- a/plugins/VisitsSummary/templates/index.twig
+++ b/plugins/VisitsSummary/templates/index.twig
@@ -7,10 +7,3 @@
 
 <h2 class="visitsSummaryReportTitle">{{ 'General_Report'|translate }}</h2>
 {% include "@VisitsSummary/_sparklines.twig" %}
-{#
-Time page generation
-	<p style='color:lightgrey; size:0.8em;'>
-	{{ 'VisitsSummary_GenerateTime'|translate(totalTimeGeneration,totalNumberOfQueries) }}
-	{% if totalNumberOfQueries != 0 %}, {{ 'VisitsSummary_GenerateQueries'|translate(totalNumberOfQueries) }}{% endif %}
-	</p>
-#}
-- 
GitLab