mirror of
https://github.com/friendica/friendica
synced 2024-12-23 01:20:16 +00:00
Makes save_timestamp conditional
- Add a .htconfig check to save_timestamp to prevent systematic profiling - Removes unused `mark_timestamp()` function including deleted code comment
This commit is contained in:
parent
a5923bdd4f
commit
74ce4c2710
2 changed files with 3 additions and 6 deletions
8
boot.php
8
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());
|
||||
}
|
||||
|
|
|
@ -145,7 +145,6 @@ class Conversation extends BaseObject {
|
|||
$result[] = $item_data;
|
||||
}
|
||||
|
||||
//$a->mark_timestamp();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue