Refactor SendCoarseLocations for better performance. Instead of computing list of all locations fresh for every scene presence on every frame, we will instead compute the list once every 50 frames and send to all connected presences at that time. Also, we only add 60 items to the list when there are more than 60 presences in the scene. For 1000 users, this change yields a 99.8% reduction in list processing and a 98% reduction in network bandwidth for coarse locations.

This commit is contained in:
Dan Lake
2010-06-08 16:30:51 -07:00
committed by John Hurliman
parent 0520b62955
commit ca2abc43ad
6 changed files with 59 additions and 67 deletions

View File

@@ -696,7 +696,9 @@ namespace OpenSim.Region.RegionCombinerModule
presence.SetSendCourseLocationMethod(SendCourseLocationUpdates);
}
private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence)
// This delegate was refactored for non-combined regions.
// This combined region version will not use the pre-compiled lists of locations and ids
private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
{
RegionConnections connectiondata = null;
lock (m_regions)