From 604502b5448650cff3c1885c06b28dbd56df6817 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 26 Jun 2020 16:47:08 +0000 Subject: SL-13443 Reduced viewer stalls after teleport Eliminates stall from saveObjectCache() on region deletion --- indra/newview/llviewerregion.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.cpp') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index e67826454b..f1cfacc1f6 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -102,6 +102,7 @@ const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000; BOOL LLViewerRegion::sVOCacheCullingEnabled = FALSE; S32 LLViewerRegion::sLastCameraUpdated = 0; S32 LLViewerRegion::sNewObjectCreationThrottle = -1; +LLViewerRegion::vocache_entry_map_t LLViewerRegion::sRegionCacheCleanup; typedef std::map CapabilityMap; @@ -633,6 +634,9 @@ void LLViewerRegion::initStats() mAlive = false; // can become false if circuit disconnects } +static LLTrace::BlockTimerStatHandle FTM_CLEANUP_REGION_OBJECTS("Cleanup Region Objects"); +static LLTrace::BlockTimerStatHandle FTM_SAVE_REGION_CACHE("Save Region Cache"); + LLViewerRegion::~LLViewerRegion() { mDead = TRUE; @@ -647,7 +651,10 @@ LLViewerRegion::~LLViewerRegion() disconnectAllNeighbors(); LLViewerPartSim::getInstance()->cleanupRegion(this); - gObjectList.killObjects(this); + { + LL_RECORD_BLOCK_TIME(FTM_CLEANUP_REGION_OBJECTS); + gObjectList.killObjects(this); + } delete mImpl->mCompositionp; delete mParcelOverlay; @@ -658,7 +665,10 @@ LLViewerRegion::~LLViewerRegion() #endif std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer()); - saveObjectCache(); + { + LL_RECORD_BLOCK_TIME(FTM_SAVE_REGION_CACHE); + saveObjectCache(); + } delete mImpl; mImpl = NULL; @@ -727,6 +737,8 @@ void LLViewerRegion::saveObjectCache() mCacheDirty = FALSE; } + // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle + sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end()); mImpl->mCacheMap.clear(); } @@ -1488,6 +1500,16 @@ void LLViewerRegion::idleUpdate(F32 max_update_time) return; } +// static +void LLViewerRegion::idleCleanup(F32 max_update_time) +{ + LLTimer update_timer; + while (!sRegionCacheCleanup.empty() && (max_update_time - update_timer.getElapsedTimeF32() > 0)) + { + sRegionCacheCleanup.erase(sRegionCacheCleanup.begin()); + } +} + //update the throttling number for new object creation void LLViewerRegion::calcNewObjectCreationThrottle() { -- cgit v1.2.3 From 1cf3a5c505f1705a9d7169570799bda55f76e675 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Oct 2020 18:49:35 +0300 Subject: SL-14078 Caps request should log region they are requested for --- indra/newview/llviewerregion.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerregion.cpp') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a30c5156fa..8aa928f50d 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -291,6 +291,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url << " region name " << regionp->getName() + << " region id " << regionp->getRegionID() << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL; LL_DEBUGS("AppInit", "Capabilities") << "Capabilities requested: " << capabilityNames << LL_ENDL; @@ -405,7 +406,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) LLSD capabilityNames = LLSD::emptyArray(); buildCapabilityNames(capabilityNames); - LL_INFOS("AppInit", "Capabilities") << "Requesting second Seed from " << url << LL_ENDL; + LL_INFOS("AppInit", "Capabilities") << "Requesting second Seed from " << url << " for region " << regionp->getRegionID() << LL_ENDL; regionp = NULL; result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames); @@ -2221,7 +2222,7 @@ void LLViewerRegion::requestSimulatorFeatures() LLCoros::instance().launch("LLViewerRegionImpl::requestSimulatorFeatureCoro", boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, mImpl, url, getHandle())); - LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << LL_ENDL; + LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << " for region " << getRegionID() << LL_ENDL; } else { @@ -3028,7 +3029,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) if (getCapability("Seed") == url) { setCapabilityDebug("Seed", url); - LL_WARNS("CrossingCaps") << "Received duplicate seed capability, posting to seed " << + LL_WARNS("CrossingCaps") << "Received duplicate seed capability for " << getRegionID() << ", posting to seed " << url << LL_ENDL; //Instead of just returning we build up a second set of seed caps and compare them @@ -3049,7 +3050,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) LLCoros::instance().launch("LLViewerRegionImpl::requestBaseCapabilitiesCoro", boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCoro, mImpl, getHandle())); - LL_INFOS("AppInit", "Capabilities") << "Launching " << coroname << " requesting seed capabilities from " << url << LL_ENDL; + LL_INFOS("AppInit", "Capabilities") << "Launching " << coroname << " requesting seed capabilities from " << url << " for region " << getRegionID() << LL_ENDL; } S32 LLViewerRegion::getNumSeedCapRetries() -- cgit v1.2.3 From 2d84f8f6c89e0a3f0d4f692e6280eb53500d6393 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 13 Nov 2020 15:45:39 +0200 Subject: SL-14312 Show simulator host names for AWS hosted regions --- indra/newview/llviewerregion.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerregion.cpp') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 6ccf38cd27..2fde4fe49c 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3361,5 +3361,12 @@ U32 LLViewerRegion::getMaxMaterialsPerTransaction() const return max_entries; } - +std::string LLViewerRegion::getSimHostName() +{ + if (mSimulatorFeaturesReceived) + { + return mSimulatorFeatures.has("HostName") ? mSimulatorFeatures["HostName"].asString() : getHost().getHostName(); + } + return std::string("..."); +} -- cgit v1.2.3