From 2a10bd406c9155d30a82657ce2ee532b3a677d83 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 May 2023 09:55:31 -0400 Subject: DRTVWR-559: Replace debugLoggingEnabled() function with LL_DEBUGS(). The trouble with debugLoggingEnabled() is that it locked mutexes and searched maps every time that call was reached. LL_DEBUGS() has the same functionality (albeit with idiosyncratic syntax) but performs expensive lookups only once per session, caching the result in a local static variable. --- indra/newview/pipeline.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index df8b8a552a..88359d06b9 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3016,17 +3016,16 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f { if (drawablep && !drawablep->isDead() && assertInitialized()) { - if (debugLoggingEnabled("AnimatedObjectsLinkset")) + LL_DEBUGS("AnimatedObjectsLinkset"); + LLVOVolume *vol_obj = drawablep->getVOVolume(); + if (vol_obj && vol_obj->isAnimatedObject() && vol_obj->isRiggedMesh()) { - LLVOVolume *vol_obj = drawablep->getVOVolume(); - if (vol_obj && vol_obj->isAnimatedObject() && vol_obj->isRiggedMesh()) - { - std::string vobj_name = llformat("Vol%p", vol_obj); - F32 est_tris = vol_obj->getEstTrianglesMax(); - LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " markRebuild, tris " << est_tris - << " priority " << (S32) priority << " flag " << std::hex << flag << LL_ENDL; - } + std::string vobj_name = llformat("Vol%p", vol_obj); + F32 est_tris = vol_obj->getEstTrianglesMax(); + LL_CONT << vobj_name << " markRebuild, tris " << est_tris + << " priority " << (S32) priority << " flag " << std::hex << flag; } + LL_ENDL; if (!drawablep->isState(LLDrawable::BUILT)) { -- cgit v1.2.3