HTTP Texture changes:
* Fixed bug in llqueuedthread.cpp causing unnecesssary sleeeping * Fixed an issue that was preventing retries on 503 errors * Added number of pending creates to Texture View * Increased time allocated for texture createsmaster
parent
74b36a4cf1
commit
abe0eb2ba7
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in New Issue