summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llaisapi.cpp3
-rw-r--r--indra/newview/llaisapi.h1
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp6
-rw-r--r--indra/newview/llviewerinventory.cpp11
5 files changed, 27 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a2a1b3f117..43d3f63a34 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -15283,6 +15283,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>BatchSizeAIS3</key>
+ <map>
+ <key>Comment</key>
+ <string>Amount of folder ais packs into category subset request</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>20</integer>
+ </map>
<key>PoolSizeAIS</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 951860e39d..b09b8ec517 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -46,6 +46,7 @@
//=========================================================================
const std::string AISAPI::INVENTORY_CAP_NAME("InventoryAPIv3");
const std::string AISAPI::LIBRARY_CAP_NAME("LibraryAPIv3");
+const S32 AISAPI::HTTP_TIMEOUT = 180;
std::list<AISAPI::ais_query_item_t> AISAPI::sPostponedQuery;
@@ -823,7 +824,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
LLCore::HttpHeaders::ptr_t httpHeaders;
- httpOptions->setTimeout(180);
+ httpOptions->setTimeout(HTTP_TIMEOUT);
LL_DEBUGS("Inventory") << "Request url: " << url << LL_ENDL;
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index 6270a34081..973c82a847 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -38,6 +38,7 @@
class AISAPI
{
public:
+ static const S32 HTTP_TIMEOUT;
typedef enum {
INVENTORY,
LIBRARY
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 5f7950df08..8f1012868f 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -729,10 +729,12 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
gInventory.getDirectDescendentsOf(cat_id, categories, items);
LLViewerInventoryCategory::EFetchType target_state = LLViewerInventoryCategory::FETCH_RECURSIVE;
- // technically limit is 'as many as you can put into url', but for now stop at 10
- const S32 batch_limit = 20;
bool content_done = true;
+ // Top limit is 'as many as you can put into url'
+ static LLCachedControl<S32> ais_batch(gSavedSettings, "BatchSizeAIS3", 20);
+ S32 batch_limit = llclamp(ais_batch(), 1, 40);
+
for (LLInventoryModel::cat_array_t::iterator it = categories->begin();
it != categories->end();
++it)
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 96f0b500a0..80e4f5f6d5 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -690,9 +690,16 @@ void LLViewerInventoryCategory::setFetching(LLViewerInventoryCategory::EFetchTyp
{
if (mDescendentsRequested.hasExpired() || (mFetching == FETCH_NONE))
{
- const F32 FETCH_TIMER_EXPIRY = 30.0f;
mDescendentsRequested.reset();
- mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
+ if (AISAPI::isAvailable())
+ {
+ mDescendentsRequested.setTimerExpirySec(AISAPI::HTTP_TIMEOUT);
+ }
+ else
+ {
+ const F32 FETCH_TIMER_EXPIRY = 30.0f;
+ mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
+ }
}
mFetching = fetching;
}