diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-09-14 18:42:42 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-09-14 18:51:33 +0300 |
commit | fa47e4402b7925a45c5fec9fb9d92fb5e34a589e (patch) | |
tree | 6056c5c4b0ad333464fd664751d9ea1ce5255fa6 /indra/newview/llinventoryobserver.cpp | |
parent | b5c745185f4e3d2d215b5a171dc96a57d01eb079 (diff) |
SL-20285 Sturdier cof and fixed link fetching
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 227d4285eb..51be44bef4 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -334,21 +334,14 @@ void LLInventoryFetchItemsObserver::startFetch() if (aisv3) { - const S32 MAX_INDIVIDUAL_REQUESTS = 10; + const S32 MAX_INDIVIDUAL_REQUESTS = 7; for (requests_by_folders_t::value_type &folder : requests) { - LLViewerInventoryCategory* cat = gInventory.getCategory(folder.first); if (folder.second.size() > MAX_INDIVIDUAL_REQUESTS) { // requesting one by one will take a while // do whole folder - if (cat) - { - // Either drop version or use scheduleFolderFetch to force-fetch - // otherwise background fetch will ignore folders with set version - cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN); - } - LLInventoryModelBackgroundFetch::getInstance()->start(folder.first); + LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); } else { @@ -360,12 +353,11 @@ void LLInventoryFetchItemsObserver::startFetch() // start fetching whole folder since it's not ready either way cat->fetch(); } - else if (cat->getViewerDescendentCount() <= folder.second.size()) + else if (cat->getViewerDescendentCount() <= folder.second.size() + || cat->getDescendentCount() <= folder.second.size()) { // Start fetching whole folder since we need all items - // Drop version or use scheduleFolderFetch - cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN); - cat->fetch(); + LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); } else @@ -382,6 +374,7 @@ void LLInventoryFetchItemsObserver::startFetch() // Isn't supposed to happen? We should have all folders // and if item exists, folder is supposed to exist as well. llassert(false); + LL_WARNS("Inventory") << "Missing folder: " << folder.first << " fetching items individually" << LL_ENDL; // get items one by one for (LLUUID &item_id : folder.second) |