From 5d4821443adc584f0262c68f8b33fa8bb36f8406 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Thu, 4 Jun 2026 01:38:33 +0300 Subject: #5892 Process high priority inventory updates immediately --- indra/newview/llaisapi.cpp | 18 ++++++++++++++++++ indra/newview/llaisapi.h | 2 ++ 2 files changed, 20 insertions(+) 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; -- cgit v1.3