This is being resolved by cherrypicking 19196840 by mark.lintott from UE5/Main (see original changelist details at the end of this cl description). On top of the cherrypick, there was a change made to re-use a single Http request when fetching stats. This avoids the overhead of doing name resolution repeatedly if the zen instance has a name instead of IP address.
Tested by:
- Running ShooterGame editor & observing UnrealInsights for ZenHttp_CurlPerform timers and ensuring they are not happening on the game thread when the editor is sitting idle (they are on background threads instead)
-Terminating ZenServer.exe while the editor is running and observing whether the framerate of the editor is negatively affected
#rb matt.peters
[FYI] mark.lintott
#jira UE-132849
#jira UE-143182
#lockdown aurel.cordonnier
#preflight 6220038831454c90cc13a123
Original changelist:
============
Blocking Zen HTTP stats request now runs async using futures
#rb Andriy.Tylychko
#[fyi] Zousar.Shaker
#jira UE-132849
#preflight 621e0c71e15c51d8c5bd5967
#ushell-cherrypick of 19196840 by mark.lintott
#ROBOMERGE-OWNER: zousar.shaker
#ROBOMERGE-AUTHOR: zousar.shaker
#ROBOMERGE-SOURCE: CL 19234318 in //UE5/Release-5.0/... via CL 19236659
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19237357 by zousar shaker in ue5-main branch]
Re-use Curl request when gathering stats. Rate limit it to no more than 2/second. Still keeping it synchronous and blocking for now.
Avoid using "localhost" and prefer the IPV6 loopback address of [::1] to avoid name resolution penalty for localhost.
Keep DNS cache in Curl permanently for a given request.
#rb devin.doucette
#jira UE-142437
#preflight 620a7d7b6e5d06a542963178
#ROBOMERGE-AUTHOR: zousar.shaker
#ROBOMERGE-SOURCE: CL 18980515 in //UE5/Release-5.0/... via CL 18980843 via CL 18981187
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)
[CL 18981362 by zousar shaker in ue5-main branch]
Unknown POST sizes cause later libcurl versions to add an Transfer-Encoding header which is not compatible with the Content-Length header. An exert from the libcurl docs; "without chunked transfer, you must specify the size in the request. (Since 7.66.0, libcurl will automatically use chunked encoding for POSTs if the size is unknown.) When providing data with a callback, you must transmit it using chunked transfer-encoding or you must set the size of the data with the CURLOPT_POSTFIELDSIZE"
#rb sbo
#rnx
#preflight 61f255fffc74f46b56569b47
[CL 18751364 by Martin Ridgers in ue5-main branch]
#preflight 61f170657266f4e79bd44c52
#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 18736232 in //UE5/Release-5.0/... via CL 18736248 via CL 18736471
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18736490 by matt peters in ue5-main branch]