summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-28 19:34:26 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-28 19:34:26 +0300
commit4bfcf182d7a961d8ebfe17b453e54cfac26347ce (patch)
tree2c03620480d8358d56a4a26673d58006afe4aa4b /indra/newview
parent9349a9b5d4ccb21f195e5c156d897836399fd11b (diff)
SL-19533 Fetch stall prevention #2
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llaisapi.cpp15
-rw-r--r--indra/newview/llaisapi.h2
2 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index e63d77cea3..951860e39d 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -1550,6 +1550,7 @@ void AISUpdate::doUpdate()
}
// CREATE CATEGORIES
+ const S32 MAX_UPDATE_BACKLOG = 50; // stall prevention
for (deferred_category_map_t::const_iterator create_it = mCategoriesCreated.begin();
create_it != mCategoriesCreated.end(); ++create_it)
{
@@ -1558,6 +1559,13 @@ void AISUpdate::doUpdate()
gInventory.updateCategory(new_category, LLInventoryObserver::CREATE);
LL_DEBUGS("Inventory") << "created category " << category_id << LL_ENDL;
+
+ // fetching can receive massive amount of items and fodlers
+ if (gInventory.getChangedIDs().size() > MAX_UPDATE_BACKLOG)
+ {
+ gInventory.notifyObservers();
+ checkTimeout();
+ }
}
// UPDATE CATEGORIES
@@ -1612,6 +1620,13 @@ void AISUpdate::doUpdate()
// case this is create.
LL_DEBUGS("Inventory") << "created item " << item_id << LL_ENDL;
gInventory.updateItem(new_item, LLInventoryObserver::CREATE);
+
+ // fetching can receive massive amount of items and fodlers
+ if (gInventory.getChangedIDs().size() > MAX_UPDATE_BACKLOG)
+ {
+ gInventory.notifyObservers();
+ checkTimeout();
+ }
}
// UPDATE ITEMS
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index 691c5db592..6270a34081 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -130,7 +130,7 @@ private:
// 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.01f;
+ const F32 EXPIRY_SECONDS_LIVE = 0.008f;
typedef std::map<LLUUID,S32> uuid_int_map_t;
uuid_int_map_t mCatDescendentDeltas;