mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:10:11 +00:00
Generate callstack value from inside Profiler::saveTimestamp
- Save a massive amount of time computing callstacks when profiling is disabled
This commit is contained in:
parent
19141b1bcf
commit
afb882048e
13 changed files with 42 additions and 39 deletions
|
@ -199,7 +199,7 @@ class HTTPRequest implements IHTTPRequest
|
|||
|
||||
@curl_close($ch);
|
||||
|
||||
$this->profiler->saveTimestamp($stamp1, 'network', System::callstack());
|
||||
$this->profiler->saveTimestamp($stamp1, 'network');
|
||||
|
||||
return $curlResponse;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ class HTTPRequest implements IHTTPRequest
|
|||
|
||||
curl_close($ch);
|
||||
|
||||
$this->profiler->saveTimestamp($stamp1, 'network', System::callstack());
|
||||
$this->profiler->saveTimestamp($stamp1, 'network');
|
||||
|
||||
// Very old versions of Lighttpd don't like the "Expect" header, so we remove it when needed
|
||||
if ($curlResponse->getReturnCode() == 417) {
|
||||
|
@ -335,7 +335,7 @@ class HTTPRequest implements IHTTPRequest
|
|||
$http_code = $curl_info['http_code'];
|
||||
curl_close($ch);
|
||||
|
||||
$this->profiler->saveTimestamp($stamp1, "network", System::callstack());
|
||||
$this->profiler->saveTimestamp($stamp1, "network");
|
||||
|
||||
if ($http_code == 0) {
|
||||
return $url;
|
||||
|
@ -377,7 +377,7 @@ class HTTPRequest implements IHTTPRequest
|
|||
$body = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
$this->profiler->saveTimestamp($stamp1, "network", System::callstack());
|
||||
$this->profiler->saveTimestamp($stamp1, "network");
|
||||
|
||||
if (trim($body) == "") {
|
||||
return $url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue