From 6c9b136d321ac0c9528d1c50dc0ced0b55ae1c64 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 5 Apr 2013 20:46:33 +0200 Subject: [PATCH] Removal of HTTPRequestRate and dead code. --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/lltexturefetch.cpp | 24 ------------------------ 2 files changed, 35 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2b7f2fb86..4de95b255 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -172,17 +172,6 @@ 1 - HTTPRequestRate - - Comment - Number of HTTP texture requests fired per second. - Persist - 1 - Type - U32 - Value - 30 - HTTPMaxRequests Comment diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 22b98c1c5..e3aed97c1 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -495,30 +495,6 @@ public: SGHostBlackList::blacklist_t SGHostBlackList::blacklist; -#if 0 -//call every time a connection is opened -//return true if connecting allowed -static bool sgConnectionThrottle() { - const U32 THROTTLE_TIMESTEPS_PER_SECOND = 10; - static const LLCachedControl max_connections_per_second("HTTPRequestRate", 30); - U32 max_connections = max_connections_per_second/THROTTLE_TIMESTEPS_PER_SECOND; - const U32 timestep = USEC_PER_SEC/THROTTLE_TIMESTEPS_PER_SECOND; - U64 now = LLTimer::getTotalTime(); - std::deque timestamps; - while(!timestamps.empty() && (timestamps[0]<=now-timestep)) { - timestamps.pop_front(); - } - if(timestamps.size() < max_connections) { - //llinfos << "throttle pass" << llendl; - timestamps.push_back(now); - return true; - } else { - //llinfos << "throttle fail" << llendl; - return false; - } -} -#endif - ////////////////////////////////////////////////////////////////////////////// // Cross-thread messaging for asset metrics.