SL-20285 Updated individual request count declaration

master
Andrey Kleshchev 2023-09-14 20:58:42 +03:00
parent fa47e4402b
commit b09c19d27c
3 changed files with 6 additions and 4 deletions

View File

@ -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);

View File

@ -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

View File

@ -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;