Relax a highly constraining lock on m_entityUpdates that may be preventing reprioritizations from actually happening. #LoginLag

viewer-2-initial-appearance
Diva Canto 2010-12-14 12:58:32 -08:00
parent 10ae5454cb
commit ff8ff773e7
1 changed files with 130 additions and 129 deletions

View File

@ -3557,11 +3557,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
int updatesThisCall = 0;
lock (m_entityUpdates.SyncRoot)
{
EntityUpdate update;
while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update))
while (updatesThisCall < maxUpdates)
{
lock (m_entityUpdates.SyncRoot)
if (!m_entityUpdates.TryDequeue(out update))
break;
if (update.Entity is SceneObjectPart)
{
SceneObjectPart part = (SceneObjectPart)update.Entity;
@ -3751,7 +3753,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
}
#endregion Packet Sending
}