diff options
author | Mic Bowman | 2011-04-12 12:36:36 -0700 |
---|---|---|
committer | Mic Bowman | 2011-04-13 15:37:25 -0700 |
commit | 3fe22126ca3974b2a10365121ee0141fb54806e6 (patch) | |
tree | d0373a62acefe93d4023c5eeb179fb6645d059bc /OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs | |
parent | New tokenbucket algorithm. This one provides fair sharing of the queues (diff) | |
download | opensim-SC_OLD-3fe22126ca3974b2a10365121ee0141fb54806e6.zip opensim-SC_OLD-3fe22126ca3974b2a10365121ee0141fb54806e6.tar.gz opensim-SC_OLD-3fe22126ca3974b2a10365121ee0141fb54806e6.tar.bz2 opensim-SC_OLD-3fe22126ca3974b2a10365121ee0141fb54806e6.tar.xz |
First pass at moving object property requests into a queue similar
to the entity update queue. The number of property packets can
become significant when selecting/deselecting large numbers of
objects.
This is experimental code.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs index 364ce4b..6521a00 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs | |||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | public bool Enqueue(uint pqueue, EntityUpdate value) | 81 | public bool Enqueue(uint pqueue, IEntityUpdate value) |
82 | { | 82 | { |
83 | LookupItem lookup; | 83 | LookupItem lookup; |
84 | 84 | ||
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
99 | return true; | 99 | return true; |
100 | } | 100 | } |
101 | 101 | ||
102 | internal bool TryDequeue(out EntityUpdate value, out Int32 timeinqueue) | 102 | internal bool TryDequeue(out IEntityUpdate value, out Int32 timeinqueue) |
103 | { | 103 | { |
104 | for (int i = 0; i < m_numberOfQueues; ++i) | 104 | for (int i = 0; i < m_numberOfQueues; ++i) |
105 | { | 105 | { |
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
122 | } | 122 | } |
123 | 123 | ||
124 | timeinqueue = 0; | 124 | timeinqueue = 0; |
125 | value = default(EntityUpdate); | 125 | value = default(IEntityUpdate); |
126 | return false; | 126 | return false; |
127 | } | 127 | } |
128 | 128 | ||
@@ -175,8 +175,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
175 | #region MinHeapItem | 175 | #region MinHeapItem |
176 | private struct MinHeapItem : IComparable<MinHeapItem> | 176 | private struct MinHeapItem : IComparable<MinHeapItem> |
177 | { | 177 | { |
178 | private EntityUpdate value; | 178 | private IEntityUpdate value; |
179 | internal EntityUpdate Value { | 179 | internal IEntityUpdate Value { |
180 | get { | 180 | get { |
181 | return this.value; | 181 | return this.value; |
182 | } | 182 | } |
@@ -212,7 +212,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
212 | this.pqueue = pqueue; | 212 | this.pqueue = pqueue; |
213 | } | 213 | } |
214 | 214 | ||
215 | internal MinHeapItem(uint pqueue, UInt64 entryorder, EntityUpdate value) | 215 | internal MinHeapItem(uint pqueue, UInt64 entryorder, IEntityUpdate value) |
216 | { | 216 | { |
217 | this.entrytime = Util.EnvironmentTickCount(); | 217 | this.entrytime = Util.EnvironmentTickCount(); |
218 | this.entryorder = entryorder; | 218 | this.entryorder = entryorder; |