From 7ebbc58ae310b5c41efb3fe1460d63663ab92004 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 08:29:35 -0400 Subject: Cache various frequently accessed settings (#2080) --- indra/newview/llvoavatar.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index fadea01d3c..fcd2f74108 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4070,12 +4070,14 @@ void LLVOAvatar::updateDebugText() { // Leave mDebugText uncleared here, in case a derived class has added some state first - if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) + static LLCachedControl debug_av_appearance_message(gSavedSettings, "DebugAvatarAppearanceMessage"); + if (debug_av_appearance_message) { updateAppearanceMessageDebugText(); } - if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked")) + static LLCachedControl debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked"); + if (debug_av_composite_baked) { if (!mBakedTextureDebugText.empty()) addDebugText(mBakedTextureDebugText); @@ -8592,7 +8594,8 @@ LLMotion* LLVOAvatar::findMotion(const LLUUID& id) const // colorized if using deferred rendering. void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color) { - if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked")) + static LLCachedControl debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked"); + if (debug_av_composite_baked) { avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin(); avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end(); -- cgit v1.2.3