summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-12-07 20:10:41 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-12-07 20:21:25 +0200
commitf064cba4362b6ab183fb16192305338953867f2b (patch)
tree0b9924ba084c64c79e294af17e0d4714c472bc8f /indra/newview
parent59b826e66e658d9d9a4f19dcabdccbc79ec3590c (diff)
SL-14399 Remove obsolete code
mCoroWaitList covers all assets not just landmarks
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lllandmarklist.cpp50
-rw-r--r--indra/newview/lllandmarklist.h1
2 files changed, 0 insertions, 51 deletions
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index 31e76267e6..d790c6f95e 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -39,12 +39,6 @@
// Globals
LLLandmarkList gLandmarkList;
-// number is mostly arbitrary, but it should be below DEFAULT_QUEUE_SIZE pool size,
-// which is 4096, to not overfill the pool if user has more than 4K of landmarks
-// and it should leave some space for other potential simultaneous asset request
-const S32 MAX_SIMULTANEOUS_REQUESTS = 512;
-
-
////////////////////////////////////////////////////////////////////////////
// LLLandmarkList
@@ -83,12 +77,6 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t
loaded_callback_map_t::value_type vt(asset_uuid, cb);
mLoadedCallbackMap.insert(vt);
}
-
- if ( mWaitList.find(asset_uuid) != mWaitList.end() )
- {
- // Landmark is sheduled for download, but not requested yet
- return NULL;
- }
landmark_requested_list_t::iterator iter = mRequestedList.find(asset_uuid);
if (iter != mRequestedList.end())
@@ -100,17 +88,6 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t
}
}
- if (mRequestedList.size() > MAX_SIMULTANEOUS_REQUESTS)
- {
- // Workarounds for corutines pending list size limit:
- // Postpone download till queue is emptier.
- // Coroutines have own built in 'pending' list, but unfortunately
- // it is too small compared to potential amount of landmarks
- // or assets.
- mWaitList.insert(asset_uuid);
- return NULL;
- }
-
mRequestedList[asset_uuid] = gFrameTimeSeconds;
// Note that getAssetData can callback immediately and cleans mRequestedList
@@ -197,33 +174,6 @@ void LLLandmarkList::processGetAssetReply(
gLandmarkList.mRequestedList.erase(uuid); //mBadList effectively blocks any load, so no point keeping id in requests
gLandmarkList.eraseCallbacks(uuid);
}
-
- // getAssetData can fire callback immediately, causing
- // a recursion which is suboptimal for very large wait list.
- // 'scheduling' indicates that we are inside request and
- // shouldn't be launching more requests.
- static bool scheduling = false;
- if (!scheduling && !gLandmarkList.mWaitList.empty())
- {
- scheduling = true;
- while (!gLandmarkList.mWaitList.empty() && gLandmarkList.mRequestedList.size() < MAX_SIMULTANEOUS_REQUESTS)
- {
- // start new download from wait list
- landmark_uuid_list_t::iterator iter = gLandmarkList.mWaitList.begin();
- LLUUID asset_uuid = *iter;
- gLandmarkList.mWaitList.erase(iter);
-
- // add to mRequestedList before calling getAssetData()
- gLandmarkList.mRequestedList[asset_uuid] = gFrameTimeSeconds;
-
- // Note that getAssetData can callback immediately and cleans mRequestedList
- gAssetStorage->getAssetData(asset_uuid,
- LLAssetType::AT_LANDMARK,
- LLLandmarkList::processGetAssetReply,
- NULL);
- }
- scheduling = false;
- }
}
BOOL LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid)
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index f5fa958204..b50332b215 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -72,7 +72,6 @@ protected:
typedef std::set<LLUUID> landmark_uuid_list_t;
landmark_uuid_list_t mBadList;
- landmark_uuid_list_t mWaitList;
typedef std::map<LLUUID,F32> landmark_requested_list_t;
landmark_requested_list_t mRequestedList;