aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-01 19:33:18 +0000
committerMelanie Thielker2009-05-01 19:33:18 +0000
commit0f721da5f1f2827a286fadb8ef7207266ba2d9f1 (patch)
tree7df098edb0251de54c520f1ff082eaa703a56cb5 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentThrottle prim sending a bit (again) to ensure the queues don't overrun and (diff)
downloadopensim-SC_OLD-0f721da5f1f2827a286fadb8ef7207266ba2d9f1.zip
opensim-SC_OLD-0f721da5f1f2827a286fadb8ef7207266ba2d9f1.tar.gz
opensim-SC_OLD-0f721da5f1f2827a286fadb8ef7207266ba2d9f1.tar.bz2
opensim-SC_OLD-0f721da5f1f2827a286fadb8ef7207266ba2d9f1.tar.xz
Add a tweakable for the prim queue preload
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 50cebfb..7e1063d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -141,6 +141,8 @@ namespace OpenSim.Region.Framework.Scenes
141 141
142 private Vector3 m_lastVelocity = Vector3.Zero; 142 private Vector3 m_lastVelocity = Vector3.Zero;
143 143
144 private int m_maxPrimsPerFrame = 200;
145
144 // Default AV Height 146 // Default AV Height
145 private float m_avHeight = 127.0f; 147 private float m_avHeight = 127.0f;
146 148
@@ -392,6 +394,12 @@ namespace OpenSim.Region.Framework.Scenes
392 set { m_parentPosition = value; } 394 set { m_parentPosition = value; }
393 } 395 }
394 396
397 public int MaxPrimsPerFrame
398 {
399 get { return m_maxPrimsPerFrame; }
400 set { m_maxPrimsPerFrame = value; }
401 }
402
395 /// <summary> 403 /// <summary>
396 /// Absolute position of this avatar in 'region cordinates' 404 /// Absolute position of this avatar in 'region cordinates'
397 /// </summary> 405 /// </summary>
@@ -747,7 +755,7 @@ namespace OpenSim.Region.Framework.Scenes
747 } 755 }
748 } 756 }
749 757
750 while (m_pendingObjects != null && m_pendingObjects.Count > 0 && m_partsUpdateQueue.Count < 60) 758 while (m_pendingObjects != null && m_pendingObjects.Count > 0 && m_partsUpdateQueue.Count < m_maxPrimsPerFrame)
751 { 759 {
752 SceneObjectGroup g = m_pendingObjects.Dequeue(); 760 SceneObjectGroup g = m_pendingObjects.Dequeue();
753 761
@@ -763,8 +771,6 @@ namespace OpenSim.Region.Framework.Scenes
763 g.ScheduleFullUpdateToAvatar(this); 771 g.ScheduleFullUpdateToAvatar(this);
764 } 772 }
765 773
766 int updateCount = 0;
767
768 while (m_partsUpdateQueue.Count > 0) 774 while (m_partsUpdateQueue.Count > 0)
769 { 775 {
770 SceneObjectPart part = m_partsUpdateQueue.Dequeue(); 776 SceneObjectPart part = m_partsUpdateQueue.Dequeue();
@@ -798,7 +804,6 @@ namespace OpenSim.Region.Framework.Scenes
798 804
799 update.LastFullUpdateTime = part.TimeStampFull; 805 update.LastFullUpdateTime = part.TimeStampFull;
800 806
801 updateCount++;
802 } 807 }
803 else if (update.LastTerseUpdateTime <= part.TimeStampTerse) 808 else if (update.LastTerseUpdateTime <= part.TimeStampTerse)
804 { 809 {
@@ -809,7 +814,6 @@ namespace OpenSim.Region.Framework.Scenes
809 part.SendTerseUpdateToClient(ControllingClient); 814 part.SendTerseUpdateToClient(ControllingClient);
810 815
811 update.LastTerseUpdateTime = part.TimeStampTerse; 816 update.LastTerseUpdateTime = part.TimeStampTerse;
812 updateCount++;
813 } 817 }
814 } 818 }
815 else 819 else
@@ -833,11 +837,7 @@ namespace OpenSim.Region.Framework.Scenes
833 837
834 part.SendFullUpdate(ControllingClient, 838 part.SendFullUpdate(ControllingClient,
835 GenerateClientFlags(part.UUID)); 839 GenerateClientFlags(part.UUID));
836 updateCount++;
837 } 840 }
838
839 if (updateCount > 200)
840 break;
841 } 841 }
842 842
843 m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); 843 m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS);