diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 0b9dec969c..8fbbc36162 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -359,10 +359,11 @@ void LLThread::setQuitting() } // static -LLThread::id_t LLThread::currentID() -{ - return std::this_thread::get_id(); -} +// give this a better chance to inline +// LLThread::id_t LLThread::currentID() +// { +// return std::this_thread::get_id(); +// } // static void LLThread::yield() diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 5cd0731f6c..118c60d7a6 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -60,8 +60,8 @@ public: bool isQuitting() const { return (QUITTING == mStatus); } bool isStopped() const { return (STOPPED == mStatus) || (CRASHED == mStatus); } bool isCrashed() const { return (CRASHED == mStatus); } - - static id_t currentID(); // Return ID of current thread + // Try to encourage the inlining + static LL_FORCE_INLINE id_t currentID(){return std::this_thread::get_id();}; // Return ID of current thread static void yield(); // Static because it can be called by the main thread, which doesn't have an LLThread data structure. public: diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4d552837de..4c857f6ca9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8904,7 +8904,7 @@ bool LLVOAvatar::isTooComplex() const // Performance improvement //bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends")); static LLCachedControl alwaysRenderFriends(gSavedSettings, "AlwaysRenderFriends"); - bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && alwaysRenderFriends); + bool render_friend = ( alwaysRenderFriends && LLAvatarTracker::instance().isBuddy( getID() ) ); // Beq note: isBuddy can be slow only check if we have to // if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)