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

@ -3834,11 +3834,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary>
public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
//double priority = m_prioritizer.GetUpdatePriority(this, entity);
uint priority = m_prioritizer.GetUpdatePriority(this, entity);
if (entity.UUID == m_agentId && !updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
{
ImprovedTerseObjectUpdatePacket packet
= (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
lock (m_entityUpdates.SyncRoot)
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
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);
uint priority = m_prioritizer.GetUpdatePriority(this, entity);
lock (m_entityUpdates.SyncRoot)
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
}
}
/// <summary>

View File

@ -898,6 +898,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// packet so that it isn't sent before a queued update packet.
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))
{
SendPacketFinal(outgoingPacket);
@ -907,6 +915,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
return false;
}
// }
#endregion Queue or Send
}