From b81c1c4e871be0ff5e5dbbfa235571350cd477fe Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 31 Jul 2025 20:42:38 +0800 Subject: 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). --- indra/newview/llavatarlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llavatarlist.h') diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 97b4f05985..5ef7eeb041 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -74,6 +74,7 @@ public: uuid_vec_t& getIDs() { return mIDs; } bool contains(const LLUUID& id); + void setAvatarsPositions(const std::map& avatarsPositions); void setContextMenu(LLListContextMenu* menu) { mContextMenu = menu; } void setSessionID(const LLUUID& session_id) { mSessionID = session_id; } const LLUUID& getSessionID() { return mSessionID; } @@ -114,8 +115,6 @@ protected: const uuid_vec_t& vnew, uuid_vec_t& vadded, uuid_vec_t& vremoved); - void updateAvatarArrivalTime(); - void updateAvatarDistance(); void updateLastInteractionTimes(); void rebuildNames(); void onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask); @@ -144,6 +143,7 @@ private: uuid_vec_t mIDs; LLUUID mSessionID; + std::map mAvatarsPositions; LLListContextMenu* mContextMenu; commit_signal_t mRefreshCompleteSignal; -- cgit v1.2.3 From 3c464b4d8bb9bed58edc0418a8c91e8a609b5160 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 31 Jul 2025 23:39:09 +0800 Subject: Optimise arrival & departure notifications by not having extra calls to getAvatars. The avatars' positions member had to be moved to an object that is accessible from VOAvatar too, and that would be the global Agent. It makes sense too, that it's the object that keeps the positions of other agents. It even has a section for positions too. --- indra/newview/llavatarlist.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llavatarlist.h') diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 5ef7eeb041..e6e0728a3f 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -74,7 +74,6 @@ public: uuid_vec_t& getIDs() { return mIDs; } bool contains(const LLUUID& id); - void setAvatarsPositions(const std::map& avatarsPositions); void setContextMenu(LLListContextMenu* menu) { mContextMenu = menu; } void setSessionID(const LLUUID& session_id) { mSessionID = session_id; } const LLUUID& getSessionID() { return mSessionID; } @@ -143,7 +142,6 @@ private: uuid_vec_t mIDs; LLUUID mSessionID; - std::map mAvatarsPositions; LLListContextMenu* mContextMenu; commit_signal_t mRefreshCompleteSignal; -- cgit v1.2.3