summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-06-04 01:38:33 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-07-07 19:56:55 +0300
commit5d4821443adc584f0262c68f8b33fa8bb36f8406 (patch)
treee605481c93dd06917b004ebbeaa7818c2261beab
parent854ac889cd51694754da408271d0a2fa5c070b31 (diff)
#5892 Process high priority inventory updates immediately
-rw-r--r--indra/newview/llaisapi.cpp18
-rw-r--r--indra/newview/llaisapi.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 1c5530916f..f0b7457fa2 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -1039,6 +1039,19 @@ AISUpdate::AISUpdate(const LLSD& update, AISAPI::COMMAND_TYPE type, const LLSD&
mFetchDepth = request_body["depth"].asInteger();
}
+ // Some tasks are time sensitive, don't wait for them.
+ // Like FETCHCOF which happens on load and is needed for outfit
+ // loading.
+ // FETCHCATEGORYLINKS is used for wearing outfits and fetching
+ // a user selected outfit or for following an outfit link in COF.
+ // Other tasks, like FETCHCATEGORYSUBSET are general background
+ // fetches and can safely wait.
+ // Do count 'time sensitive' tasks in batch timer.
+ mUseTimeout =
+ type != AISAPI::UPDATECATEGORY
+ && type != AISAPI::UPDATEITEM
+ && type != AISAPI::FETCHCOF
+ && type != AISAPI::FETCHCATEGORYLINKS;
mTaskTimer.setTimerExpirySec(AIS_TASK_EXPIRY_SECONDS);
mTaskTimer.start();
@@ -1069,6 +1082,11 @@ void AISUpdate::clearParseResults()
void AISUpdate::checkTimeout()
{
+ if (!mUseTimeout)
+ {
+ // Priority task, don't wait.
+ return;
+ }
if (mTaskTimer.hasExpired() || sBatchTimer.hasExpired())
{
// If we are taking too long, don't starve other tasks,
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index 1dab0dd1f9..b31768d426 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -109,6 +109,7 @@ private:
class AISUpdate
{
+ LOG_CLASS(AISUpdate);
public:
AISUpdate(const LLSD& update, AISAPI::COMMAND_TYPE type, const LLSD& request_body);
void parseUpdate(const LLSD& update);
@@ -158,6 +159,7 @@ private:
uuid_list_t mCategoryIds;
bool mFetch;
S32 mFetchDepth;
+ bool mUseTimeout;
LLTimer mTaskTimer;
static LLTimer sBatchTimer;
static U32 sBatchFrameCount;