Improve efficiency of friends notification by only make one PresenceService call for all friends rather than one for each friend.

However, large groups could still take a very long time since we still need to message each avatar on different simulators.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-10-20 02:02:13 +01:00
parent cd3762ca9f
commit da2b23f18d
4 changed files with 28 additions and 33 deletions

View File

@@ -128,7 +128,7 @@ namespace OpenSim.Services.Connectors.Friends
return Call(region, sendData);
}
public bool StatusNotify(GridRegion region, UUID userID, UUID friendID, bool online)
public bool StatusNotify(GridRegion region, UUID userID, string friendID, bool online)
{
Dictionary<string, object> sendData = new Dictionary<string, object>();
//sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
@@ -136,7 +136,7 @@ namespace OpenSim.Services.Connectors.Friends
sendData["METHOD"] = "status";
sendData["FromID"] = userID.ToString();
sendData["ToID"] = friendID.ToString();
sendData["ToID"] = friendID;
sendData["Online"] = online.ToString();
return Call(region, sendData);

View File

@@ -397,7 +397,7 @@ namespace OpenSim.Services.HypergridService
if (region != null)
{
m_log.DebugFormat("[HGFRIENDS SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline"));
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online);
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online);
}
}
}

View File

@@ -504,7 +504,7 @@ namespace OpenSim.Services.HypergridService
if (region != null)
{
m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline"));
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online);
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online);
}
}
}