From ca2abc43ad440a99f17b43d32de89e77fdeef00e Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 8 Jun 2010 16:30:51 -0700 Subject: 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. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') 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 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate); loc.Header.Reliable = false; - // Each packet can only hold around 62 avatar positions and the client clears the mini-map each time + // Each packet can only hold around 60 avatar positions and the client clears the mini-map each time // a CoarseLocationUpdate packet is received. Oh well. int total = Math.Min(CoarseLocations.Count, 60); -- cgit v1.1