diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-07-31 20:42:38 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-07-31 20:48:39 +0800 |
commit | b81c1c4e871be0ff5e5dbbfa235571350cd477fe (patch) | |
tree | 2a3e599e3db36bd42628fcb681a67b7b956a6ab1 /indra/newview/llpanelpeople.cpp | |
parent | 0146a8b3119e2c6c652dd7b608de9efcdbd3fd50 (diff) |
Optimise nearby tab distance & arrival time impl
by not having extra calls to getAvatars, by avoiding unnecessary
function overhead which actually make it possible to share some
iterative code, and by piggybacking updateNearbyList and
updateArrivalTime which is already done periodically though the
range had to be lengthened to match nearby list range which is
MPVNearMeRange instead of SLv's NearMeRange. Minimise differences
from SLv too (arrival time really doesn't need to be updated
*every* second.. every 5 seconds is just okay).
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index bf2462d7d9..6d1c71b893 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -160,6 +160,7 @@ public: mAvatarsPositions[*id_it] = *pos_it; } }; + const id_to_pos_map_t& getAvatarsPositions() const { return mAvatarsPositions; } protected: virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const @@ -849,6 +850,7 @@ void LLPanelPeople::updateNearbyList() #endif DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs()); + mNearbyList->setAvatarsPositions(DISTANCE_COMPARATOR.getAvatarsPositions()); LLActiveSpeakerMgr::instance().update(true); } @@ -1569,7 +1571,7 @@ bool LLPanelPeople::updateNearbyArrivalTime() { std::vector<LLVector3d> positions; std::vector<LLUUID> uuids; - static LLCachedControl<F32> range(gSavedSettings, "NearMeRange"); + static LLCachedControl<F32> range(gSavedSettings, "MPVNearMeRange"); LLWorld::getInstance()->getAvatars(&uuids, &positions, gAgent.getPositionGlobal(), range); LLRecentPeople::instance().updateAvatarsArrivalTime(uuids); return LLApp::isExiting(); |