For now, send all non-full terse updates for ones own avatar directly to the LLUDP client stack rather than queueing internally within LLClientView.

When an HG avatar enters a scene, it delays processing of entity updates.  Could be crowding out by other updates or something else.
This delay in ones own av mvmt updates results in mvmt lag experienced on the client.  Avoiding the internal LLClientView for these packets appears to resolve this issue.
Appears most noticeably for avatars with attachments, though has also been seen on those without sometimes.  Hasn't been observed for non-HG avatars in general.
Will be investigating exactly what the problem is, at which point there will be a more permanent solution.
ghosts
Justin Clark-Casey (justincc) 2014-10-21 18:27:09 +01:00
parent c1a2c4a0bd
commit 7d2aad3873
2 changed files with 27 additions and 4 deletions

View File

@ -3833,6 +3833,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// and broadcast the packet to clients /// and broadcast the packet to clients
/// </summary> /// </summary>
public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
if (entity.UUID == m_agentId && !updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
{
ImprovedTerseObjectUpdatePacket packet
= (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = Utils.FloatToUInt16(1, 0.0f, 1.0f);
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
packet.ObjectData[0] = CreateImprovedTerseBlock(entity, false);
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
}
else
{ {
//double priority = m_prioritizer.GetUpdatePriority(this, entity); //double priority = m_prioritizer.GetUpdatePriority(this, entity);
uint priority = m_prioritizer.GetUpdatePriority(this, entity); uint priority = m_prioritizer.GetUpdatePriority(this, entity);
@ -3840,6 +3853,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
lock (m_entityUpdates.SyncRoot) lock (m_entityUpdates.SyncRoot)
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
} }
}
/// <summary> /// <summary>
/// Requeue an EntityUpdate when it was not acknowledged by the client. /// Requeue an EntityUpdate when it was not acknowledged by the client.

View File

@ -898,6 +898,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// packet so that it isn't sent before a queued update packet. // packet so that it isn't sent before a queued update packet.
bool forceQueue = (type == PacketType.KillObject); bool forceQueue = (type == PacketType.KillObject);
// if (type == PacketType.ImprovedTerseObjectUpdate)
// {
// m_log.DebugFormat("Direct send ITOU to {0} in {1}", udpClient.AgentID, Scene.Name);
// SendPacketFinal(outgoingPacket);
// return false;
// }
// else
// {
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, forceQueue)) if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, forceQueue))
{ {
SendPacketFinal(outgoingPacket); SendPacketFinal(outgoingPacket);
@ -907,6 +915,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
return false; return false;
} }
// }
#endregion Queue or Send #endregion Queue or Send
} }