From bdf8cacc4cd216d7df8212177587a21979d2a883 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 1 Apr 2013 14:35:12 -0700 Subject: MAINT-2511 : Mesh requests not handling time outs. Reviewed by Kelly --- indra/newview/llmeshrepository.cpp | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 809f85a7b5..5154809240 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -288,7 +288,14 @@ public: ~LLMeshSkinInfoResponder() { - //llassert(mProcessed); this will assert due to a timeout (not handled?) MAINT-2511 + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -313,7 +320,14 @@ public: ~LLMeshDecompositionResponder() { - //llassert(mProcessed); this will assert due to a timeout (not handled?) MAINT-2511 + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshDecomposition(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -338,7 +352,14 @@ public: ~LLMeshPhysicsShapeResponder() { - //llassert(mProcessed); this will assert due to a timeout (not handled?) MAINT-2511 + if (!LLApp::isQuitting() && + !mProcessed && + mMeshID.notNull()) + { // Something went wrong, retry + llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); + } } virtual void completedRaw(U32 status, const std::string& reason, @@ -1984,7 +2005,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } @@ -2047,7 +2068,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } @@ -2111,7 +2132,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } -- cgit v1.2.3 From 15e2f76615581341a861ed0e37da96170e2aee61 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 3 Apr 2013 16:26:11 -0700 Subject: MAINT-2558 - Add viewer debug setting for more logging on avatar render info. Reviewed by Kelly --- indra/newview/app_settings/settings.xml | 11 ++++ indra/newview/llavatarrenderinfoaccountant.cpp | 77 +++++++++++++++----------- indra/newview/llavatarrenderinfoaccountant.h | 2 + 3 files changed, 57 insertions(+), 33 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 384e83a2a0..4c6940500e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9400,6 +9400,17 @@ Value 0 + RenderAutoMuteLogging + + Comment + Show extra information in viewer logs about avatar rendering costs + Persist + 1 + Type + Boolean + Value + 0 + RenderAutoMuteVisibilityRank Comment diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 04a79f7d4c..54144677f4 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -37,15 +37,13 @@ #include "llcharacter.h" #include "llhttpclient.h" #include "lltimer.h" +#include "llviewercontrol.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llvoavatar.h" #include "llworld.h" -// Use this for debugging -//#define LL_AVATAR_RENDER_INFO_LOG_SPAM - static const std::string KEY_AGENTS = "agents"; // map static const std::string KEY_WEIGHT = "weight"; // integer static const std::string KEY_GEOMETRY = "geometry"; // integer @@ -94,9 +92,10 @@ public: LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); if (regionp) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Result for avatar weights request for region " << regionp->getName() << ":" << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (LLAvatarRenderInfoAccountant::logRenderInfo()) + { + llinfos << "Result for avatar weights request for region " << regionp->getName() << ":" << llendl; + } if (content.isMap()) { @@ -116,10 +115,11 @@ public: agent_info_map.isMap()) { // Extract the data for this avatar - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << " Agent " << target_agent_id - << ": " << agent_info_map << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (LLAvatarRenderInfoAccountant::logRenderInfo()) + { + llinfos << " Agent " << target_agent_id + << ": " << agent_info_map << llendl; + } if (agent_info_map.has(KEY_WEIGHT)) { @@ -194,10 +194,11 @@ public: LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); if (regionp) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Result for avatar weights POST for region " << regionp->getName() - << ": " << content << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (LLAvatarRenderInfoAccountant::logRenderInfo()) + { + llinfos << "Result for avatar weights POST for region " << regionp->getName() + << ": " << content << llendl; + } if (content.isMap()) { @@ -231,12 +232,13 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio std::string url = regionp->getCapability("AvatarRenderInfo"); if (!url.empty()) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Sending avatar render info to region " - << regionp->getName() - << " from " << url - << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Sending avatar render info to region " + << regionp->getName() + << " from " << url + << llendl; + } // Build the render info to POST to the region LLSD report = LLSD::emptyMap(); @@ -271,10 +273,11 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio agents[avatar->getID().asString()] = info; } - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Sending avatar render info for " << avatar->getID() - << ": " << info << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Sending avatar render info for " << avatar->getID() + << ": " << info << llendl; + } } iter++; } @@ -297,12 +300,13 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi std::string url = regionp->getCapability("AvatarRenderInfo"); if (!url.empty()) { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Requesting avatar render info for region " - << regionp->getName() - << " from " << url - << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Requesting avatar render info for region " + << regionp->getName() + << " from " << url + << llendl; + } // First send a request to get the latest data LLHTTPClient::get(url, new LLAvatarRenderInfoGetResponder(regionp->getHandle())); @@ -351,10 +355,17 @@ void LLAvatarRenderInfoAccountant::idle() // are returned for a new LLViewerRegion, and is the earliest time to get render info void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer() { - #ifdef LL_AVATAR_RENDER_INFO_LOG_SPAM - llinfos << "Viewer has new region capabilities" << llendl; - #endif // LL_AVATAR_RENDER_INFO_LOG_SPAM + if (logRenderInfo()) + { + llinfos << "Viewer has new region capabilities" << llendl; + } sRenderInfoReportTimer.resetWithExpiry(0.f); } +// static +bool LLAvatarRenderInfoAccountant::logRenderInfo() +{ + static LLCachedControl render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging"); + return render_mute_logging_enabled; +} diff --git a/indra/newview/llavatarrenderinfoaccountant.h b/indra/newview/llavatarrenderinfoaccountant.h index 5b4a4d3db2..97dd9f0ad3 100644 --- a/indra/newview/llavatarrenderinfoaccountant.h +++ b/indra/newview/llavatarrenderinfoaccountant.h @@ -46,6 +46,8 @@ public: static void idle(); + static bool logRenderInfo(); + private: // Send data updates about once per minute, only need per-frame resolution static LLFrameTimer sRenderInfoReportTimer; -- cgit v1.2.3