From 5566f28b039e2f3999e397a26243707affc80991 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 3 Oct 2023 19:27:26 +0300 Subject: D559 Post merge fixes --- indra/newview/llaisapi.cpp | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'indra/newview/llaisapi.cpp') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 087cfb8d48..b7d0b1ef1a 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -873,26 +873,9 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht LLSD httpResults; LLCore::HttpStatus status; - if (debugLoggingEnabled("Inventory")) - { - LLTimer ais_timer; - ais_timer.start(); - result = invoke(httpAdapter , httpRequest , url , body , httpOptions , httpHeaders); - httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; - status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - F32MillisecondsImplicit elapsed_time = ais_timer.getElapsedTimeF32(); - - LL_DEBUGS("Inventory") << "Request type: " << (S32)type - << " \nRequest target: " << targetId - << " \nElapsed time since request: " << elapsed_time - << " \nstatus: " << status.toULong() << LL_ENDL; - } - else - { - result = invoke(httpAdapter , httpRequest , url , body , httpOptions , httpHeaders); - httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; - status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - } + result = invoke(httpAdapter , httpRequest , url , body , httpOptions , httpHeaders); + httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); if (!status || !result.isMap()) { @@ -1053,7 +1036,7 @@ AISUpdate::AISUpdate(const LLSD& update, AISAPI::COMMAND_TYPE type, const LLSD& mFetchDepth = request_body["depth"].asInteger(); } - mTimer.setTimerExpirySec(debugLoggingEnabled("Inventory") ? EXPIRY_SECONDS_DEBUG : EXPIRY_SECONDS_LIVE); + mTimer.setTimerExpirySec(EXPIRY_SECONDS_LIVE); mTimer.start(); parseUpdate(update); } @@ -1079,7 +1062,7 @@ void AISUpdate::checkTimeout() { llcoro::suspend(); LLCoros::checkStop(); - mTimer.setTimerExpirySec(debugLoggingEnabled("Inventory") ? EXPIRY_SECONDS_DEBUG : EXPIRY_SECONDS_LIVE); + mTimer.setTimerExpirySec(EXPIRY_SECONDS_LIVE); } } -- cgit v1.3 From 5d7b1b09ff195611548bababf36d412ef76ed924 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 4 Oct 2023 00:01:51 +0300 Subject: MacOS build fix --- indra/newview/llaisapi.cpp | 4 ++-- indra/newview/llaisapi.h | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/newview/llaisapi.cpp') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index b7d0b1ef1a..17e1a27934 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -1036,7 +1036,7 @@ AISUpdate::AISUpdate(const LLSD& update, AISAPI::COMMAND_TYPE type, const LLSD& mFetchDepth = request_body["depth"].asInteger(); } - mTimer.setTimerExpirySec(EXPIRY_SECONDS_LIVE); + mTimer.setTimerExpirySec(AIS_EXPIRY_SECONDS); mTimer.start(); parseUpdate(update); } @@ -1062,7 +1062,7 @@ void AISUpdate::checkTimeout() { llcoro::suspend(); LLCoros::checkStop(); - mTimer.setTimerExpirySec(EXPIRY_SECONDS_LIVE); + mTimer.setTimerExpirySec(AIS_EXPIRY_SECONDS); } } diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 0fdf4a0b74..f254f21e42 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -130,10 +130,9 @@ private: void clearParseResults(); void checkTimeout(); - // Debug is very log-heavy, give it more time or it will take forever to process - // Todo: find a way to make throttle static isntead of per-request - const F32 EXPIRY_SECONDS_DEBUG = 1.f; - const F32 EXPIRY_SECONDS_LIVE = 0.008f; + // Fetch can return large packets of data, throttle it to not cause lags + // Todo: make throttle work over all fetch requests isntead of per-request + const F32 AIS_EXPIRY_SECONDS = 0.008f; typedef std::map uuid_int_map_t; uuid_int_map_t mCatDescendentDeltas; -- cgit v1.3