degradate udp network efficiency a even more

0.9.1.0-post-fixes
UbitUmarov 2019-04-10 14:01:10 +01:00
parent ee989dd552
commit 4475b3db27
1 changed files with 3 additions and 6 deletions

View File

@ -1672,7 +1672,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
s = 2 * i; s = 2 * i;
OpenSimTerrainCompressor.CreatePatchFromTerrainData(bitpack, terrData, map[s], map[s + 1]); OpenSimTerrainCompressor.CreatePatchFromTerrainData(bitpack, terrData, map[s], map[s + 1]);
if (bitpack.BytePos > 950 && i != numberPatchs - 1) if (bitpack.BytePos > 900 && i != numberPatchs - 1)
{ {
//finish this packet //finish this packet
bitpack.PackBitsFromByte(END_OF_PATCHES); bitpack.PackBitsFromByte(END_OF_PATCHES);
@ -5100,7 +5100,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if(objectUpdates != null) if(objectUpdates != null)
{ {
int blocks = objectUpdates.Count;
List<EntityUpdate> tau = new List<EntityUpdate>(30); List<EntityUpdate> tau = new List<EntityUpdate>(30);
UDPPacketBuffer buf = m_udpServer.GetNewUDPBuffer(m_udpClient.RemoteEndPoint); UDPPacketBuffer buf = m_udpServer.GetNewUDPBuffer(m_udpClient.RemoteEndPoint);
@ -5141,13 +5140,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
CreatePrimUpdateBlock(part, mysp, zc); CreatePrimUpdateBlock(part, mysp, zc);
} }
if (zc.Position < LLUDPServer.MAXPAYLOAD - 200) if (zc.Position < LLUDPServer.MAXPAYLOAD - 300)
{ {
tau.Add(eu); tau.Add(eu);
++count; ++count;
--blocks;
} }
else if (blocks > 0) else
{ {
// we need more packets // we need more packets
UDPPacketBuffer newbuf = m_udpServer.GetNewUDPBuffer(m_udpClient.RemoteEndPoint); UDPPacketBuffer newbuf = m_udpServer.GetNewUDPBuffer(m_udpClient.RemoteEndPoint);
@ -5179,7 +5177,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
tau = new List<EntityUpdate>(30); tau = new List<EntityUpdate>(30);
tau.Add(eu); tau.Add(eu);
count = 1; count = 1;
--blocks;
} }
} }