diff options
author | Teravus Ovares | 2008-02-07 08:15:38 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-07 08:15:38 +0000 |
commit | 3674257095f0c511b1f5810fdc034c2d49bb73a8 (patch) | |
tree | a9b4cda92de5ef51d7626b526aa19cd5a563089d /OpenSim/Region/Environment/Scenes | |
parent | * didn't save :P so, this is the other half to my last commit (diff) | |
download | opensim-SC-3674257095f0c511b1f5810fdc034c2d49bb73a8.zip opensim-SC-3674257095f0c511b1f5810fdc034c2d49bb73a8.tar.gz opensim-SC-3674257095f0c511b1f5810fdc034c2d49bb73a8.tar.bz2 opensim-SC-3674257095f0c511b1f5810fdc034c2d49bb73a8.tar.xz |
* This update contains a bucket-full of network optimizations.
* ParcelProperties are sent only when needed instead of on any movement
* Terse Updates and other temporary data packets are marked unreliable
* After a certain amount of users, the sim actually sends updates on things less
* Experimental
* Tested to 68 avatar with pCampBot (And it's surprising what actually causes the most lag.. the text chat!)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | 7 |
3 files changed, 31 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 6b891fd..a62e6c6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -626,7 +626,28 @@ namespace OpenSim.Region.Environment.Scenes | |||
626 | // Aquire a lock so only one update call happens at once | 626 | // Aquire a lock so only one update call happens at once |
627 | updateLock.WaitOne(); | 627 | updateLock.WaitOne(); |
628 | float physicsFPS = 0; | 628 | float physicsFPS = 0; |
629 | 629 | int agentsInScene = m_innerScene.GetRootAgentCount() + m_innerScene.GetChildAgentCount(); | |
630 | |||
631 | if (agentsInScene > 21) | ||
632 | { | ||
633 | if (m_update_entities == 1) | ||
634 | { | ||
635 | m_update_avatars = 5; | ||
636 | m_update_entities = 5; | ||
637 | m_statsReporter.SetUpdateMS(6000); | ||
638 | } | ||
639 | } | ||
640 | else | ||
641 | { | ||
642 | if (m_update_entities == 5) | ||
643 | { | ||
644 | m_update_avatars = 1; | ||
645 | m_update_entities = 1; | ||
646 | m_statsReporter.SetUpdateMS(3000); | ||
647 | } | ||
648 | } | ||
649 | |||
650 | |||
630 | frameMS = System.Environment.TickCount; | 651 | frameMS = System.Environment.TickCount; |
631 | try | 652 | try |
632 | { | 653 | { |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 4062ef6..374586c 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -77,6 +77,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | private bool m_newForce = false; | 77 | private bool m_newForce = false; |
78 | private bool m_newCoarseLocations = true; | 78 | private bool m_newCoarseLocations = true; |
79 | private bool m_gotAllObjectsInScene = false; | 79 | private bool m_gotAllObjectsInScene = false; |
80 | |||
80 | 81 | ||
81 | // Default AV Height | 82 | // Default AV Height |
82 | private float m_avHeight = 127.0f; | 83 | private float m_avHeight = 127.0f; |
@@ -354,7 +355,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
354 | RegisterToEvents(); | 355 | RegisterToEvents(); |
355 | SetDirectionVectors(); | 356 | SetDirectionVectors(); |
356 | 357 | ||
357 | m_scene.LandManager.sendLandUpdate(this); | 358 | m_scene.LandManager.sendLandUpdate(this, true); |
358 | } | 359 | } |
359 | 360 | ||
360 | public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams, | 361 | public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams, |
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index f2cefb5..3e1fec2 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -124,6 +124,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
124 | m_report.Enabled = true; | 124 | m_report.Enabled = true; |
125 | } | 125 | } |
126 | 126 | ||
127 | public void SetUpdateMS(int ms) | ||
128 | { | ||
129 | statsUpdatesEveryMS = ms; | ||
130 | statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000); | ||
131 | m_report.Interval = statsUpdatesEveryMS; | ||
132 | } | ||
133 | |||
127 | private void statsHeartBeat(object sender, EventArgs e) | 134 | private void statsHeartBeat(object sender, EventArgs e) |
128 | { | 135 | { |
129 | m_report.Enabled = false; | 136 | m_report.Enabled = false; |