Kelly Washington avatar Kelly Washington committed 19b5217

MAINT-1897 Poor performance viewing large group member lists
* llpanelgroupinvite to use LLAvatarNameCache isntead of legacy gCacheName

Comments (0)

Files changed (2)

indra/newview/llpanelgroupinvite.cpp

 			//so we need to do this additional search in avatar tracker, see EXT-4732
 			if (LLAvatarTracker::instance().isBuddy(agent_id))
 			{
-				if (!gCacheName->getFullName(agent_id, fullname))
+				LLAvatarName av_name;
+				if (!LLAvatarNameCache::get(agent_id, &av_name))
 				{
 					// actually it should happen, just in case
-					gCacheName->get(LLUUID(agent_id), false, boost::bind(
+					LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(
 							&LLPanelGroupInvite::addUserCallback, this, _1, _2));
 					// for this special case!
 					//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
 				}
 				else
 				{
-					names.push_back(fullname);
+					names.push_back(av_name.getLegacyName());
 				}
 			}
 		}
 	mImplementation->addUsers(names, agent_ids);
 }
 
-void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const std::string& full_name)
+void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const LLAvatarName& av_name)
 {
 	std::vector<std::string> names;
 	uuid_vec_t agent_ids;
 	agent_ids.push_back(id);
-	names.push_back(full_name);
+	names.push_back(av_name.getLegacyName());
 
 	mImplementation->addUsers(names, agent_ids);
 }

indra/newview/llpanelgroupinvite.h

 #include "llpanel.h"
 #include "lluuid.h"
 
+class LLAvatarName;
+
 class LLPanelGroupInvite
 : public LLPanel
 {
 	/**
 	 * this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers().
 	 */  
-	void addUserCallback(const LLUUID& id, const std::string& full_name);
+	void addUserCallback(const LLUUID& id, const LLAvatarName& av_name);
 	void clear();
 	void update();
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.