mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user