summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp21
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h2
2 files changed, 14 insertions, 9 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 35b9442966..0099e81b8f 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -191,7 +191,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch():
mFolderFetchActive(false),
mFetchCount(0),
mFetchFolderCount(0),
- mAllFoldersFetched(false),
+ mAllRecursiveFoldersFetched(false),
mRecursiveInventoryFetchStarted(false),
mRecursiveLibraryFetchStarted(false),
mMinTimeBetweenFetches(0.3f)
@@ -242,7 +242,7 @@ bool LLInventoryModelBackgroundFetch::inventoryFetchInProgress() const
bool LLInventoryModelBackgroundFetch::isEverythingFetched() const
{
- return mAllFoldersFetched;
+ return mAllRecursiveFoldersFetched;
}
BOOL LLInventoryModelBackgroundFetch::folderFetchActive() const
@@ -395,7 +395,7 @@ void LLInventoryModelBackgroundFetch::setAllFoldersFetched()
if (mRecursiveInventoryFetchStarted &&
mRecursiveLibraryFetchStarted)
{
- mAllFoldersFetched = true;
+ mAllRecursiveFoldersFetched = true;
//LL_INFOS(LOG_INV) << "All folders fetched, validating" << LL_ENDL;
//gInventory.validate();
}
@@ -576,12 +576,17 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis()
curent_time = LLTimer::getTotalSeconds();
}
- while (!mFetchItemQueue.empty() && mFetchCount < max_concurrent_fetches && curent_time < end_time)
+ if (mRecursiveInventoryFetchStarted && mAllRecursiveFoldersFetched)
{
- const FetchQueueInfo & fetch_info(mFetchItemQueue.front());
- bulkFetchViaAis(fetch_info);
- mFetchItemQueue.pop_front();
- curent_time = LLTimer::getTotalSeconds();
+ // 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();
+ }
}
LL_DEBUGS(LOG_INV , "AIS3") << "Total active fetches: " << mFetchCount
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index eae2ba6af8..bd54c17c8d 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -113,7 +113,7 @@ protected:
private:
bool mRecursiveInventoryFetchStarted;
bool mRecursiveLibraryFetchStarted;
- bool mAllFoldersFetched;
+ bool mAllRecursiveFoldersFetched;
typedef boost::signals2::signal<void()> folders_fetched_signal_t;
folders_fetched_signal_t mFoldersFetchedSignal;