summaryrefslogtreecommitdiff
path: root/indra/newview/lllandmarklist.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
commit7efe727f266af2119d4cd6e33fdd6c26636c1a24 (patch)
tree62cce6d78c94b58205ce43bebd693303488ddace /indra/newview/lllandmarklist.cpp
parentffca94c0b89d9734fa16fde7751bd0e5785e5ea2 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
DRTVWR-558: Merge branch 'main' of secondlife/viewer into actions
Diffstat (limited to 'indra/newview/lllandmarklist.cpp')
-rw-r--r--indra/newview/lllandmarklist.cpp50
1 files changed, 0 insertions, 50 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)