diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-04-13 02:20:33 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-04-13 02:20:42 +0300 |
commit | 53f2e1710aab77361085fe2c2a41fea87ede0fb8 (patch) | |
tree | e22257ceacfe798a29a6c58e106f2c29e0f76322 /indra/newview/llinventorymodelbackgroundfetch.cpp | |
parent | 37530c9d736d90ec29b97e3567346a02e2826f97 (diff) |
SL-19533 Faster declouding
Diffstat (limited to 'indra/newview/llinventorymodelbackgroundfetch.cpp')
-rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index f650cc383f..56646830a2 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -586,17 +586,15 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() curent_time = LLTimer::getTotalSeconds(); } - if (mRecursiveInventoryFetchStarted && mAllRecursiveFoldersFetched) + // Ideally we shouldn't fetch items if recursive fetch isn't done, + // but there is a chance some request will start timeouting and recursive + // fetch will get stuck on a signle folder, don't block item fetch in such case + while (!mFetchItemQueue.empty() && mFetchCount < max_concurrent_fetches && curent_time < end_time) { - // Don't fetch items if recursive fetch isn't done, - // it gets both items and folders and should get the items in question faster - while (!mFetchItemQueue.empty() && mFetchCount < max_concurrent_fetches && curent_time < end_time) - { - const FetchQueueInfo& fetch_info(mFetchItemQueue.front()); - bulkFetchViaAis(fetch_info); - mFetchItemQueue.pop_front(); - curent_time = LLTimer::getTotalSeconds(); - } + const FetchQueueInfo& fetch_info(mFetchItemQueue.front()); + bulkFetchViaAis(fetch_info); + mFetchItemQueue.pop_front(); + curent_time = LLTimer::getTotalSeconds(); } if (last_fetch_count != mFetchCount // if anything was added @@ -696,7 +694,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc item_type = AISAPI::LIBRARY; } - AISAPI::FetchCategoryChildren(cat_id , item_type , type == FT_RECURSIVE , cb); + AISAPI::FetchCategoryChildren(cat_id , item_type , type == FT_RECURSIVE , cb, 0); } } else |