mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
RequestServer+AK: Move happy-path logging behind REQUESTSERVER_DEBUG
vdbgln() was responsible for ~10% of samples on pv's flamegraph for RequestServer (under request_did_finish) when loading github.com in Browser and recording a whole-system profile. This makes that almost completely disappear.
This commit is contained in:
parent
0e56dac51e
commit
6d532649d4
4 changed files with 12 additions and 6 deletions
|
@ -105,14 +105,14 @@ decltype(auto) get_or_create_connection(auto& cache, URL const& url, auto& job)
|
|||
}
|
||||
auto& connection = sockets_for_url[index];
|
||||
if (!connection.has_started) {
|
||||
dbgln("Immediately start request for url {} in {} - {}", url, &connection, connection.socket);
|
||||
dbgln_if(REQUESTSERVER_DEBUG, "Immediately start request for url {} in {} - {}", url, &connection, connection.socket);
|
||||
connection.has_started = true;
|
||||
connection.removal_timer->stop();
|
||||
connection.timer.start();
|
||||
connection.current_url = url;
|
||||
start_job(*connection.socket);
|
||||
} else {
|
||||
dbgln("Enqueue request for URL {} in {} - {}", url, &connection, connection.socket);
|
||||
dbgln_if(REQUESTSERVER_DEBUG, "Enqueue request for URL {} in {} - {}", url, &connection, connection.socket);
|
||||
connection.request_queue.append(move(start_job));
|
||||
}
|
||||
return connection;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue