From da86dd08c48f54641d397a1a14d4a956d302eb25 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Tue, 6 Aug 2019 00:09:59 -0500 Subject: [PATCH] Throttle avie complexity calculation frequency to once per 5s per avie. --- indra/newview/llvoavatar.cpp | 8 ++++++-- indra/newview/llvoavatar.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 26f136549..dc91b315d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -10623,8 +10623,12 @@ void LLVOAvatar::idleUpdateRenderComplexity() } } - // Render Complexity - calculateUpdateRenderComplexity(); // Update mVisualComplexity if needed + if (mComplexityTimer.getElapsedTimeF32() > 5.f) + { + // Render Complexity + calculateUpdateRenderComplexity(); // Update mVisualComplexity if needed + mComplexityTimer.start(); + } if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME)) { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 7df17cc7c..928292791 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -1171,6 +1171,8 @@ public: private: S32 mIdleMinute; + LLTimer mComplexityTimer; + //CCS Nametag public: void setNameFromChat(const std::string &text);