summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-31 12:32:57 -0500
committerOz Linden <oz@lindenlab.com>2011-01-31 12:32:57 -0500
commitcb6d59513eabe72029821a96191873351fd5c753 (patch)
treeed311d11da22ab8d1aff695166d0ca38d269ccae /indra/newview/lltexturefetch.cpp
parentd0b5e6b0b4acebd1b11685dea290b830957ba9dc (diff)
parentbbb4fb10a50495669ec5d49da4a39950a5e2042d (diff)
merge changes for storm-829
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 4f63abb152..18c3a3b87d 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1141,7 +1141,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//1, not openning too many file descriptors at the same time;
//2, control the traffic of http so udp gets bandwidth.
//
- static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 32 ;
+ static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 8 ;
if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE)
{
return false ; //wait.
@@ -1822,6 +1822,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mImageDecodeThread(imagedecodethread),
mTextureBandwidth(0),
mHTTPTextureBits(0),
+ mTotalHTTPRequests(0),
mCurlGetRequest(NULL),
mQAMode(qa_mode)
{
@@ -1973,6 +1974,7 @@ void LLTextureFetch::addToHTTPQueue(const LLUUID& id)
{
LLMutexLock lock(&mNetworkQueueMutex);
mHTTPTextureQueue.insert(id);
+ mTotalHTTPRequests++;
}
void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32 received_size)
@@ -2035,6 +2037,15 @@ S32 LLTextureFetch::getNumHTTPRequests()
return size ;
}
+U32 LLTextureFetch::getTotalNumHTTPRequests()
+{
+ mNetworkQueueMutex.lock() ;
+ U32 size = mTotalHTTPRequests ;
+ mNetworkQueueMutex.unlock() ;
+
+ return size ;
+}
+
// call lockQueue() first!
LLTextureFetchWorker* LLTextureFetch::getWorkerAfterLock(const LLUUID& id)
{