Browse Source

Makes save_timestamp conditional

- Add a .htconfig check to save_timestamp to prevent systematic
profiling
- Removes unused `mark_timestamp()` function including deleted code
comment
pull/2862/head
Hypolite Petovan 4 years ago
parent
commit
74ce4c2710
2 changed files with 3 additions and 6 deletions
  1. +3
    -5
      boot.php
  2. +0
    -1
      object/Conversation.php

+ 3
- 5
boot.php View File

@ -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());
}


+ 0
- 1
object/Conversation.php View File

@ -145,7 +145,6 @@ class Conversation extends BaseObject {
$result[] = $item_data;
}
//$a->mark_timestamp();
return $result;
}


Loading…
Cancel
Save