]> git.mxchange.org Git - friendica.git/commitdiff
Makes save_timestamp conditional
authorHypolite Petovan <ben.lort@gmail.com>
Sat, 22 Oct 2016 02:50:58 +0000 (22:50 -0400)
committerHypolite Petovan <ben.lort@gmail.com>
Sat, 22 Oct 2016 02:50:58 +0000 (22:50 -0400)
- Add a .htconfig check to save_timestamp to prevent systematic
profiling
- Removes unused `mark_timestamp()` function including deleted code
comment

boot.php
object/Conversation.php

index f39fb0369cba8696d9037577f301b6fc0cd12530..0c25dfef3d0ff124bc10053d5a5443c5aec3573c 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1100,6 +1100,9 @@ class App {
        }
 
        function save_timestamp($stamp, $value) {
+               if (!isset($a->config['system']['profiler']) || !$a->config['system']['profiler'])
+                       return;
+
                $duration = (float)(microtime(true)-$stamp);
 
                if (!isset($this->performance[$value])) {
@@ -1176,11 +1179,6 @@ class App {
                return implode(", ", $callstack);
        }
 
-       function mark_timestamp($mark) {
-               //$this->performance["markstart"] -= microtime(true) - $this->performance["marktime"];
-               $this->performance["markstart"] = microtime(true) - $this->performance["markstart"] - $this->performance["marktime"];
-       }
-
        function get_useragent() {
                return(FRIENDICA_PLATFORM." '".FRIENDICA_CODENAME."' ".FRIENDICA_VERSION."-".DB_UPDATE_VERSION."; ".$this->get_baseurl());
        }
index 94eed94d5f9eaa8661d6a9508b4be21a0512ff90..36c06c6d62d2c3014f880c8017b1a4f8814c4e9b 100644 (file)
@@ -145,7 +145,6 @@ class Conversation extends BaseObject {
                        $result[] = $item_data;
                }
 
-               //$a->mark_timestamp();
                return $result;
        }