From: Hypolite Petovan Date: Sat, 22 Oct 2016 02:50:58 +0000 (-0400) Subject: Makes save_timestamp conditional X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74ce4c27107966ad85a1b810d180f52f7bddf64d;p=friendica.git Makes save_timestamp conditional - Add a .htconfig check to save_timestamp to prevent systematic profiling - Removes unused `mark_timestamp()` function including deleted code comment --- diff --git a/boot.php b/boot.php index f39fb0369c..0c25dfef3d 100644 --- 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()); } diff --git a/object/Conversation.php b/object/Conversation.php index 94eed94d5f..36c06c6d62 100644 --- a/object/Conversation.php +++ b/object/Conversation.php @@ -145,7 +145,6 @@ class Conversation extends BaseObject { $result[] = $item_data; } - //$a->mark_timestamp(); return $result; }