diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index eacbbb3ee0bd793b5ee6ae993ad13cc02f194e9c..06ceeb2bc3cb6ef230f73f44d6c716d8e380804e 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -437,6 +437,7 @@ S32 LLQueuedThread::processNextRequest() if (req) { // process request + U32 start_priority = req->getPriority(); bool complete = req->processRequest(); if (complete) @@ -457,9 +458,8 @@ S32 LLQueuedThread::processNextRequest() lockData(); req->setStatus(STATUS_QUEUED); mRequestQueue.insert(req); - U32 priority = req->getPriority(); unlockData(); - if (priority < PRIORITY_NORMAL) + if (mThreaded && start_priority <= PRIORITY_LOW) { ms_sleep(1); // sleep the thread a little } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 9f69ed3964fedbdb8630644841c66ab90d289e09..83e0b5396066f8429226f593d8ed7f63d5b741bb 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -448,6 +448,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker() mFormattedImage = NULL; clearPackets(); unlockWorkMutex(); + mFetcher->removeFromHTTPQueue(mID); } void LLTextureFetchWorker::clearPackets() @@ -821,6 +822,13 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mFormattedImage.notNull()) { cur_size = mFormattedImage->getDataSize(); // amount of data we already have + if (mFormattedImage->getDiscardLevel() == 0) + { + // We already have all the data, just decode it + mLoadedDiscard = mFormattedImage->getDiscardLevel(); + mState = DECODE_IMAGE; + return false; + } } mRequestedSize = mDesiredSize; mRequestedDiscard = mDesiredDiscard; @@ -871,26 +879,16 @@ bool LLTextureFetchWorker::doWork(S32 param) llinfos << "HTTP GET failed for: " << mUrl << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; - if (cur_size == 0) + ++mHTTPFailCount; + if (mHTTPFailCount >= max_attempts) { - ++mHTTPFailCount; - if (mHTTPFailCount >= max_attempts) - { - resetFormattedData(); - return true; // failed - } - else - { - mState = SEND_HTTP_REQ; - return false; // retry - } + resetFormattedData(); + return true; // failed } else { - // mFormattedImage gauranteed to not be NULL since cur_size != 0 - mLoadedDiscard = mFormattedImage->getDiscardLevel(); - mState = DECODE_IMAGE; - return false; // use what we have + mState = SEND_HTTP_REQ; + return false; // retry } } diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index b6e20608eb4d55d4e6545c6d142f555918dc7730..9573b884eb9ca96b4c3011de3abfc2716ee86b13 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -494,7 +494,7 @@ void LLGLTexMemBar::draw() #endif //---------------------------------------------------------------------------- - text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d HTP:%d", + text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d HTP:%d CRE:%d", gTextureList.getNumImages(), LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount, @@ -502,7 +502,8 @@ void LLGLTexMemBar::draw() LLLFSThread::sLocal->getPending(), LLAppViewer::getImageDecodeThread()->getPending(), LLImageRaw::sRawImageCount, - LLAppViewer::getTextureFetch()->getNumHTTPRequests()); + LLAppViewer::getTextureFetch()->getNumHTTPRequests(), + gTextureList.mCreateTextureList.size()); LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*2, text_color, LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e066546bd8108b8428d228c828576428b9cc4871..8252b7df003910c33844e85b46c6e4a112a08023 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -588,7 +588,7 @@ void LLViewerTextureList::updateImages(F32 max_time) F32 total_max_time = max_time; max_time -= updateImagesFetchTextures(max_time); - max_time = llmax(max_time, total_max_time*.25f); // at least 25% of max_time + max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time max_time -= updateImagesCreateTextures(max_time); if (!mDirtyTextureList.empty())