A couple of tiny performance tweaks
parent
68d5be3856
commit
ea3cbe3ff4
|
|
@ -359,10 +359,11 @@ void LLThread::setQuitting()
|
|||
}
|
||||
|
||||
// static
|
||||
LLThread::id_t LLThread::currentID()
|
||||
{
|
||||
return std::this_thread::get_id();
|
||||
}
|
||||
// <FS:Beq> give this a better chance to inline
|
||||
// LLThread::id_t LLThread::currentID()
|
||||
// {
|
||||
// return std::this_thread::get_id();
|
||||
// }
|
||||
|
||||
// static
|
||||
void LLThread::yield()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
// <FS:Beq> 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:
|
||||
|
|
|
|||
|
|
@ -8904,7 +8904,7 @@ bool LLVOAvatar::isTooComplex() const
|
|||
// <FS:Ansariel> Performance improvement
|
||||
//bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends"));
|
||||
static LLCachedControl<bool> 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
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
|
||||
|
|
|
|||
Loading…
Reference in New Issue