aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-02-23 06:55:42 +0000
committerAdam Frisby2009-02-23 06:55:42 +0000
commitc2f3ff872dd88b4382b41844a4faa632129d1760 (patch)
tree5a0b731bcdcff54b4a5dcaa65acc7a60310a0116 /OpenSim/Region/Framework/Scenes/Scene.cs
parentLoad default assets when AssetInventory starts. (diff)
downloadopensim-SC_OLD-c2f3ff872dd88b4382b41844a4faa632129d1760.zip
opensim-SC_OLD-c2f3ff872dd88b4382b41844a4faa632129d1760.tar.gz
opensim-SC_OLD-c2f3ff872dd88b4382b41844a4faa632129d1760.tar.bz2
opensim-SC_OLD-c2f3ff872dd88b4382b41844a4faa632129d1760.tar.xz
* Performance Changes:
* Moves Entity Updates into a seperate thread, allowing for OpenSim to utilize a computers CPU more effectively in return for potentially greater user and prim capacity. * Removes an expensive Sqrt call performed during Update on each object. This should lower CPU requirements for high-prim regions with physics enabled. * MXP Changes: Centers the region around 0,0 for primitives instead of 128,128. Prim display should now look more correct for MXP viewers.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2a3f068..8d81812 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes
64 64
65 protected Timer m_restartWaitTimer = new Timer(); 65 protected Timer m_restartWaitTimer = new Timer();
66 66
67 protected Thread m_updateEntitiesThread;
68
67 public SimStatsReporter StatsReporter; 69 public SimStatsReporter StatsReporter;
68 70
69 protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); 71 protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>();
@@ -852,7 +854,19 @@ namespace OpenSim.Region.Framework.Scenes
852 otherMS = Environment.TickCount; 854 otherMS = Environment.TickCount;
853 // run through all entities looking for updates (slow) 855 // run through all entities looking for updates (slow)
854 if (m_frame % m_update_entities == 0) 856 if (m_frame % m_update_entities == 0)
855 m_sceneGraph.UpdateEntities(); 857 {
858 if (m_updateEntitiesThread == null)
859 {
860 m_updateEntitiesThread = new Thread(m_sceneGraph.UpdateEntities);
861 ThreadTracker.Add(m_updateEntitiesThread);
862 }
863
864 if(!m_updateEntitiesThread.IsAlive)
865 m_updateEntitiesThread.Start();
866
867 //m_sceneGraph.UpdateEntities();
868 }
869
856 870
857 // run through entities that have scheduled themselves for 871 // run through entities that have scheduled themselves for
858 // updates looking for updates(faster) 872 // updates looking for updates(faster)