aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-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