diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d63ab008ba..2ff56d3da8 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7268,8 +7268,8 @@ const LLUUID& LLVOAvatar::getID() const
//-----------------------------------------------------------------------------
// RN: avatar joints are multi-rooted to include screen-based attachments
// Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
-//LLJoint *LLVOAvatar::getJoint( const std::string &name )
-LLJoint *LLVOAvatar::getJoint( const JointKey &name )
+//LLJoint *LLVOAvatar::getJoint(const std::string &name)
+LLJoint *LLVOAvatar::getJoint(const JointKey &name)
//
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
@@ -7373,10 +7373,17 @@ LLJoint *LLVOAvatar::getJoint( S32 joint_num )
void LLVOAvatar::initAllJoints()
{
getJointAliases();
- for (auto& alias : mJointAliasMap)
+ // Lookup performance changes
+ //for (auto& alias : mJointAliasMap)
+ //{
+ // mJointMap[alias.first] = mRoot->findJoint(alias.second);
+ // mJointMap[JointKey::construct(alias.first).mKey] = mRoot->findJoint(alias.second);
+ //}
+ for (const auto& alias : mJointAliasMap)
{
- mJointMap[alias.first] = mRoot->findJoint(alias.second);
+ mJointMap[JointKey::construct(alias.first).mKey] = mRoot->findJoint(alias.second);
}
+ //
// ignore mScreen and mRoot
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 95a09cf006..5beff6d393 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -205,9 +205,9 @@ public:
void dumpAnimationState();
// Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
- //virtual LLJoint* getJoint( const std::string &name );
- virtual LLJoint* getJoint( const JointKey &name );
- LLJoint* getJoint( const std::string &name ) { return getJoint( JointKey::construct( name ) ); }
+ //virtual LLJoint* getJoint(const std::string &name);
+ virtual LLJoint* getJoint(const JointKey& name);
+ LLJoint* getJoint(const std::string& name) { return getJoint(JointKey::construct(name)); }
//
LLJoint* getJoint(S32 num);
void initAllJoints();
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index e527bf5c4e..1b609e9ffd 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1030,8 +1030,8 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time)
// virtual
// Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
-//LLJoint *LLVOAvatarSelf::getJoint( const std::string &name )
-LLJoint *LLVOAvatarSelf::getJoint( const JointKey &name )
+//LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
+LLJoint *LLVOAvatarSelf::getJoint(const JointKey& name)
//
{
std::lock_guard lock(mJointMapMutex);
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index de8a435be9..b57b601940 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -92,8 +92,8 @@ public:
/*virtual*/ void requestStopMotion(LLMotion* motion);
// Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
-// /*virtual*/ LLJoint* getJoint( const std::string &name );
- /*virtual*/ LLJoint* getJoint( const JointKey &name );
+// /*virtual*/ LLJoint* getJoint(const std::string &name);
+ /*virtual*/ LLJoint* getJoint(const JointKey& name);
//
/*virtual*/ void renderJoints();