diff options
author | Dan Lake | 2010-06-08 16:30:51 -0700 |
---|---|---|
committer | John Hurliman | 2010-06-08 16:44:18 -0700 |
commit | ca2abc43ad440a99f17b43d32de89e77fdeef00e (patch) | |
tree | ac8787b8db9c38d4875cc4123245006084e35609 /OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-ca2abc43ad440a99f17b43d32de89e77fdeef00e.zip opensim-SC-ca2abc43ad440a99f17b43d32de89e77fdeef00e.tar.gz opensim-SC-ca2abc43ad440a99f17b43d32de89e77fdeef00e.tar.bz2 opensim-SC-ca2abc43ad440a99f17b43d32de89e77fdeef00e.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs')
-rw-r--r-- | OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 9cb349a..ff0e743 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |||
@@ -696,7 +696,9 @@ namespace OpenSim.Region.RegionCombinerModule | |||
696 | presence.SetSendCourseLocationMethod(SendCourseLocationUpdates); | 696 | presence.SetSendCourseLocationMethod(SendCourseLocationUpdates); |
697 | } | 697 | } |
698 | 698 | ||
699 | private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence) | 699 | // This delegate was refactored for non-combined regions. |
700 | // This combined region version will not use the pre-compiled lists of locations and ids | ||
701 | private void SendCourseLocationUpdates(UUID sceneId, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs) | ||
700 | { | 702 | { |
701 | RegionConnections connectiondata = null; | 703 | RegionConnections connectiondata = null; |
702 | lock (m_regions) | 704 | lock (m_regions) |