mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user