diff options
author | Oz Linden <oz@lindenlab.com> | 2015-04-14 14:46:32 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-04-14 14:46:32 -0400 |
commit | d6d13e20f3c1238d4110ebfb8b43814df12e1b61 (patch) | |
tree | 91baec1152dc2d943c44d2cd1a7c8c612e67425a /indra | |
parent | 153d571c5c785256230b2e94825cbf20c611d4c0 (diff) |
remove disabled code
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llinventorymodelbackgroundfetch.cpp | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 5fc8b1851a..c15dab462a 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -352,159 +352,6 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. bulkFetch(); - -#if 0 - //-------------------------------------------------------------------------------- - // DEPRECATED OLD CODE - // - - // No more categories to fetch, stop fetch process. - if (mFetchQueue.empty()) - { - setAllFoldersFetched(); - return; - } - - F32 fast_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.1f); - F32 slow_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.5f); - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() > slow_fetch_time) - { - // Double timeouts on failure. - mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f); - mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); - LL_DEBUGS(LOG_INV) << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; - // fetch is no longer considered "timely" although we will wait for full time-out. - mTimelyFetchPending = FALSE; - } - - while(1) - { - if (mFetchQueue.empty()) - { - break; - } - - if (gDisconnected) - { - // Just bail if we are disconnected. - break; - } - - const FetchQueueInfo info = mFetchQueue.front(); - - if (info.mIsCategory) - { - - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); - - // Category has been deleted, remove from queue. - if (!cat) - { - mFetchQueue.pop_front(); - continue; - } - - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && - LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - // Category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle. - if (cat->fetch()) - { - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; - } - else - { - // The catagory also tracks if it has expired and here it says it hasn't - // yet. Get out of here because nothing is going to happen until we - // update the timers. - break; - } - } - // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mUUID)) - { - // Finished with this category, remove from queue. - mFetchQueue.pop_front(); - - // Add all children to queue. - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) - { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); - } - - // We received a response in less than the fast time. - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) - { - // Shrink timeouts based on success. - mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); - mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); - LL_DEBUGS(LOG_INV) << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; - } - - mTimelyFetchPending = FALSE; - continue; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - // Received first packet, but our num descendants does not match db's num descendants - // so try again later. - mFetchQueue.pop_front(); - - if (mNumFetchRetries++ < MAX_FETCH_RETRIES) - { - // push on back of queue - mFetchQueue.push_back(info); - } - mTimelyFetchPending = FALSE; - mFetchTimer.reset(); - break; - } - - // Not enough time has elapsed to do a new fetch - break; - } - else - { - LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID); - - mFetchQueue.pop_front(); - if (!itemp) - { - continue; - } - - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches) - { - itemp->fetchFromServer(); - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; - } - else if (itemp->mIsComplete) - { - mTimelyFetchPending = FALSE; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - mFetchQueue.push_back(info); - mFetchTimer.reset(); - mTimelyFetchPending = FALSE; - } - // Not enough time has elapsed to do a new fetch - break; - } - } - - // - // DEPRECATED OLD CODE - //-------------------------------------------------------------------------------- -#endif } } |