diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinventoryobserver.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 876ae23e62..8010b84c20 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4486,8 +4486,7 @@ public: // AIS can fetch couple items, but if there // is more than a dozen it will be very slow // it's faster to get whole folder in such case - const S32 MAX_INDIVIDUAL_FETCH = 10; - if (incomplete_count > MAX_INDIVIDUAL_FETCH + if (incomplete_count > LLInventoryFetchItemsObserver::MAX_INDIVIDUAL_ITEM_REQUESTS || (incomplete_count > 1 && complete_count == 0)) { LLInventoryModelBackgroundFetch::instance().scheduleFolderFetch(*it, true); diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 51be44bef4..281a8bc789 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -58,6 +58,7 @@ #include "llsdutil.h" #include <deque> +const S32 LLInventoryFetchItemsObserver::MAX_INDIVIDUAL_ITEM_REQUESTS = 7; const F32 LLInventoryFetchItemsObserver::FETCH_TIMER_EXPIRY = 60.0f; @@ -334,10 +335,9 @@ void LLInventoryFetchItemsObserver::startFetch() if (aisv3) { - const S32 MAX_INDIVIDUAL_REQUESTS = 7; for (requests_by_folders_t::value_type &folder : requests) { - if (folder.second.size() > MAX_INDIVIDUAL_REQUESTS) + if (folder.second.size() > MAX_INDIVIDUAL_ITEM_REQUESTS) { // requesting one by one will take a while // do whole folder diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 93109a70ac..bec08d2cdf 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -104,6 +104,9 @@ public: /*virtual*/ void startFetch(); /*virtual*/ void changed(U32 mask); + + // For attempts to group requests if too many items are requested + static const S32 MAX_INDIVIDUAL_ITEM_REQUESTS; private: LLTimer mFetchingPeriod; |