diff options
-rw-r--r-- | indra/newview/lllandmarklist.cpp | 50 | ||||
-rw-r--r-- | indra/newview/lllandmarklist.h | 1 |
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; |