diff options
-rw-r--r-- | indra/newview/llaisapi.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llaisapi.h | 6 | ||||
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.cpp | 9 |
5 files changed, 31 insertions, 10 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 117a596cd2..7c293fcf63 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -771,7 +771,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht LL_DEBUGS("Inventory") << "Request type: " << (S32)type << " \nRequest target: " << targetId - << " \nElapsed time ince request: " << elapsed_time + << " \nElapsed time since request: " << elapsed_time << " \nstatus: " << status.toULong() << LL_ENDL; } else @@ -904,6 +904,8 @@ AISUpdate::AISUpdate(const LLSD& update, bool fetch, S32 depth) : mFetch(fetch) , mFetchDepth(depth) { + mTimer.setTimerExpirySec(debugLoggingEnabled("Inventory") ? EXPIRY_SECONDS_DEBUG : EXPIRY_SECONDS_LIVE); + mTimer.start(); parseUpdate(update); } @@ -1279,6 +1281,13 @@ void AISUpdate::parseDescendentCount(const LLUUID& category_id, const LLSD& embe void AISUpdate::parseEmbedded(const LLSD& embedded, S32 depth) { + if (mTimer.hasExpired()) + { + llcoro::suspend(); + LLCoros::checkStop(); + mTimer.setTimerExpirySec(debugLoggingEnabled("Inventory") ? EXPIRY_SECONDS_DEBUG : EXPIRY_SECONDS_LIVE); + } + if (embedded.has("links")) // _embedded in a category { parseEmbeddedLinks(embedded["links"]); diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 0ca0144d7b..1969448627 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -124,6 +124,11 @@ public: private: void clearParseResults(); + // 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; + typedef std::map<LLUUID,S32> uuid_int_map_t; uuid_int_map_t mCatDescendentDeltas; uuid_int_map_t mCatDescendentsKnown; @@ -144,6 +149,7 @@ private: uuid_list_t mCategoryIds; bool mFetch; S32 mFetchDepth; + LLTimer mTimer; }; #endif diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index d8e7b8ca67..5d6c3be168 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -195,11 +195,6 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const return true; } - if(!checkAgainstFilterThumbnails(folder_id)) - { - return false; - } - // when applying a filter, matching folders get their contents downloaded first // but make sure we are not interfering with pre-download if (isNotDefault() @@ -207,7 +202,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const && !LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress()) { LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id); - if (!cat || (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)) + if ((!cat && folder_id.notNull()) || (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)) { // At the moment background fetch only cares about VERSION_UNKNOWN, // so do not check isCategoryComplete that compares descendant count @@ -215,6 +210,11 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const } } + if (!checkAgainstFilterThumbnails(folder_id)) + { + return false; + } + // Marketplace folder filtering const U32 filterTypes = mFilterOps.mFilterTypes; const U32 marketplace_filter = FILTERTYPE_MARKETPLACE_ACTIVE | FILTERTYPE_MARKETPLACE_INACTIVE | diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 873d3e1ccf..48539f4748 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -4681,7 +4681,6 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const } else if (count_under_root > 1) { - LL_WARNS("Inventory") << "Fatal inventory corruption: system folder type has excess copies under root, type " << ft << " count " << count_under_root << LL_ENDL; validation_info->mDuplicateRequiredSystemFolders.insert(folder_type); if (!is_automatic && folder_type != LLFolderType::FT_SETTINGS) { @@ -4689,6 +4688,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const // outfits, trash and other non-automatic folders. validation_info->mFatalSystemDuplicate++; fatal_errs++; + LL_WARNS("Inventory") << "Fatal inventory corruption: system folder type has excess copies under root, type " << ft << " count " << count_under_root << LL_ENDL; } else { @@ -4697,6 +4697,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const // Exception: FT_SETTINGS is not automatic, but only deserves a warning. validation_info->mWarnings["non_fatal_system_duplicate_under_root"]++; warning_count++; + LL_WARNS("Inventory") << "System folder type has excess copies under root, type " << ft << " count " << count_under_root << LL_ENDL; } } if (count_elsewhere > 0) diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 277ddb16ba..c5fb40409f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -555,6 +555,8 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() } static LLCachedControl<U32> ais_pool(gSavedSettings, "PoolSizeAIS", 20); + // Don't have too many requests at once + // Reserve one request for actions outside of fetch (like renames) const U32 max_concurrent_fetches = llmax(1, ais_pool - 1); if (mFetchCount >= max_concurrent_fetches) @@ -562,6 +564,9 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() return; } + // Don't fire all requests at once + const U32 max_requests_this_run = llmin(mFetchCount + 5, max_concurrent_fetches); + // Don't loop for too long (in case of large, fully loaded inventory) F64 curent_time = LLTimer::getTotalSeconds(); const F64 max_time = LLStartUp::getStartupState() > STATE_WEARABLES_WAIT @@ -570,7 +575,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() const F64 end_time = curent_time + max_time; S32 last_fetch_count = mFetchCount; - while (!mFetchFolderQueue.empty() && mFetchCount < max_concurrent_fetches && curent_time < end_time) + while (!mFetchFolderQueue.empty() && mFetchCount < max_requests_this_run && curent_time < end_time) { const FetchQueueInfo & fetch_info(mFetchFolderQueue.front()); bulkFetchViaAis(fetch_info); @@ -581,7 +586,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() // 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) + while (!mFetchItemQueue.empty() && mFetchCount < max_requests_this_run && curent_time < end_time) { const FetchQueueInfo& fetch_info(mFetchItemQueue.front()); bulkFetchViaAis(fetch_info); |