From 68981d01f024f8a46949127e1cc23c81282f5220 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Mar 2012 21:19:29 +0000 Subject: [PATCH] Stop messing order of updates, destroing the defined order of the selected priority (by distance being the one that makes sense(?). So called fairness serves no usefull purpose. If a region is lagged or user has bad comms, and far objects updates don't arrive, at least nearby thinks do have a chance to keep ticking. Just test on a big region and observe rez order on arrival. lower viewer bandwith helps seeing the diference. No use to put in core since cmic loves the priority scrambling code i comented out. --- OpenSim/Framework/PriorityQueue.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs index e7a7f7f13c..fe2a35166c 100644 --- a/OpenSim/Framework/PriorityQueue.cs +++ b/OpenSim/Framework/PriorityQueue.cs @@ -139,7 +139,12 @@ namespace OpenSim.Framework { // If there is anything in priority queue 0, return it first no // matter what else. Breaks fairness. But very useful. - for (int iq = 0; iq < NumberOfImmediateQueues; iq++) +// for (int iq = 0; iq < NumberOfImmediateQueues; iq++) + + + // keep original order + + for (int iq = 0; iq < NumberOfQueues; iq++) { if (m_heaps[iq].Count > 0) { @@ -151,7 +156,7 @@ namespace OpenSim.Framework return true; } } - +/* // To get the fair queing, we cycle through each of the // queues when finding an element to dequeue. // We pull (NumberOfQueues - QueueIndex) items from each queue in order @@ -193,7 +198,7 @@ namespace OpenSim.Framework return true; } } - +*/ timeinqueue = 0; value = default(IEntityUpdate); return false;