aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-10-20 02:13:00 +0100
committerJustin Clark-Casey (justincc)2012-10-20 02:13:00 +0100
commit1937e5f1ec73dcfb9663ad4fe4b59f33a2210d64 (patch)
tree413d287aeeb0005f223d1442b01a42871737ee74 /OpenSim/Region/OptionalModules/Avatar
parentImprove efficiency of friends notification by only make one PresenceService c... (diff)
downloadopensim-SC-1937e5f1ec73dcfb9663ad4fe4b59f33a2210d64.zip
opensim-SC-1937e5f1ec73dcfb9663ad4fe4b59f33a2210d64.tar.gz
opensim-SC-1937e5f1ec73dcfb9663ad4fe4b59f33a2210d64.tar.bz2
opensim-SC-1937e5f1ec73dcfb9663ad4fe4b59f33a2210d64.tar.xz
Relocate temporary debug message for sending group IMs to online members only so that we can add ms it takes to send.
This is chiefly to assess how long it may still take to send messages to such filtered groups.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 55bb7dc..1528330 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -241,6 +241,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
241 public void SendMessageToGroup(GridInstantMessage im, UUID groupID) 241 public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
242 { 242 {
243 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID); 243 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID);
244 int groupMembersCount = groupMembers.Count;
244 245
245 if (m_messageOnlineAgentsOnly) 246 if (m_messageOnlineAgentsOnly)
246 { 247 {
@@ -259,13 +260,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
259 HashSet<string> onlineAgentsUuidSet = new HashSet<string>(); 260 HashSet<string> onlineAgentsUuidSet = new HashSet<string>();
260 Array.ForEach<PresenceInfo>(onlineAgents, pi => onlineAgentsUuidSet.Add(pi.UserID)); 261 Array.ForEach<PresenceInfo>(onlineAgents, pi => onlineAgentsUuidSet.Add(pi.UserID));
261 262
262 int allMembersCount = groupMembers.Count;
263 groupMembers = groupMembers.Where(gmd => onlineAgentsUuidSet.Contains(gmd.AgentID.ToString())).ToList(); 263 groupMembers = groupMembers.Where(gmd => onlineAgentsUuidSet.Contains(gmd.AgentID.ToString())).ToList();
264 264
265 // if (m_debugEnabled) 265 // if (m_debugEnabled)
266 m_log.DebugFormat( 266// m_log.DebugFormat(
267 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members, {2} online", 267// "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members, {2} online",
268 groupID, allMembersCount, groupMembers.Count()); 268// groupID, groupMembersCount, groupMembers.Count());
269 } 269 }
270 else 270 else
271 { 271 {
@@ -275,6 +275,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
275 groupID, groupMembers.Count); 275 groupID, groupMembers.Count);
276 } 276 }
277 277
278 int requestStartTick = Environment.TickCount;
279
278 foreach (GroupMembersData member in groupMembers) 280 foreach (GroupMembersData member in groupMembers)
279 { 281 {
280 if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) 282 if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
@@ -316,6 +318,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
316 ProcessMessageFromGroupSession(msg); 318 ProcessMessageFromGroupSession(msg);
317 } 319 }
318 } 320 }
321
322 // Temporary for assessing how long it still takes to send messages to large online groups.
323 if (m_messageOnlineAgentsOnly)
324 m_log.DebugFormat(
325 "[GROUPS-MESSAGING]: SendMessageToGroup for group {0} with {1} visible members, {2} online took {3}ms",
326 groupID, groupMembersCount, groupMembers.Count(), Environment.TickCount - requestStartTick);
319 } 327 }
320 328
321 #region SimGridEventHandlers 329 #region SimGridEventHandlers