aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorDan Lake2010-06-08 16:30:51 -0700
committerJohn Hurliman2010-06-08 16:44:18 -0700
commitca2abc43ad440a99f17b43d32de89e77fdeef00e (patch)
treeac8787b8db9c38d4875cc4123245006084e35609 /OpenSim/Region/ClientStack
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 66631b5..fc5bb28 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3426,7 +3426,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3426 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate); 3426 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate);
3427 loc.Header.Reliable = false; 3427 loc.Header.Reliable = false;
3428 3428
3429 // Each packet can only hold around 62 avatar positions and the client clears the mini-map each time 3429 // Each packet can only hold around 60 avatar positions and the client clears the mini-map each time
3430 // a CoarseLocationUpdate packet is received. Oh well. 3430 // a CoarseLocationUpdate packet is received. Oh well.
3431 int total = Math.Min(CoarseLocations.Count, 60); 3431 int total = Math.Min(CoarseLocations.Count, 60);
3432 3432