diff options
author | Melanie Thielker | 2009-05-01 19:33:18 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-01 19:33:18 +0000 |
commit | 0f721da5f1f2827a286fadb8ef7207266ba2d9f1 (patch) | |
tree | 7df098edb0251de54c520f1ff082eaa703a56cb5 /OpenSim/Region | |
parent | Throttle prim sending a bit (again) to ensure the queues don't overrun and (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 |
3 files changed, 19 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 73daab8..638187b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -168,6 +168,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
168 | private volatile bool shuttingdown = false; | 168 | private volatile bool shuttingdown = false; |
169 | 169 | ||
170 | private int m_lastUpdate = Environment.TickCount; | 170 | private int m_lastUpdate = Environment.TickCount; |
171 | private int m_maxPrimsPerFrame = 200; | ||
171 | 172 | ||
172 | private object m_deleting_scene_object = new object(); | 173 | private object m_deleting_scene_object = new object(); |
173 | 174 | ||
@@ -229,6 +230,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
229 | get { return m_timedilation; } | 230 | get { return m_timedilation; } |
230 | } | 231 | } |
231 | 232 | ||
233 | public int MaxPrimsPerFrame | ||
234 | { | ||
235 | get { return m_maxPrimsPerFrame; } | ||
236 | set { m_maxPrimsPerFrame = value; } | ||
237 | } | ||
238 | |||
232 | /// <summary> | 239 | /// <summary> |
233 | /// This is for llGetRegionFPS | 240 | /// This is for llGetRegionFPS |
234 | /// </summary> | 241 | /// </summary> |
@@ -372,6 +379,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
372 | m_persistAfter *= 10000000; | 379 | m_persistAfter *= 10000000; |
373 | 380 | ||
374 | m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); | 381 | m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); |
382 | |||
383 | m_maxPrimsPerFrame = startupConfig.GetInt("MaxPrimsPerFrame", 200); | ||
375 | } | 384 | } |
376 | catch | 385 | catch |
377 | { | 386 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 4b4461f..7f23b7a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -617,6 +617,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
617 | 617 | ||
618 | newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance); | 618 | newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance); |
619 | newAvatar.IsChildAgent = true; | 619 | newAvatar.IsChildAgent = true; |
620 | newAvatar.MaxPrimsPerFrame = m_parentScene.MaxPrimsPerFrame; | ||
620 | 621 | ||
621 | AddScenePresence(newAvatar); | 622 | AddScenePresence(newAvatar); |
622 | 623 | ||
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); |