mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
* 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!)
This commit is contained in:
@@ -626,7 +626,28 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
// Aquire a lock so only one update call happens at once
|
||||
updateLock.WaitOne();
|
||||
float physicsFPS = 0;
|
||||
|
||||
int agentsInScene = m_innerScene.GetRootAgentCount() + m_innerScene.GetChildAgentCount();
|
||||
|
||||
if (agentsInScene > 21)
|
||||
{
|
||||
if (m_update_entities == 1)
|
||||
{
|
||||
m_update_avatars = 5;
|
||||
m_update_entities = 5;
|
||||
m_statsReporter.SetUpdateMS(6000);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_update_entities == 5)
|
||||
{
|
||||
m_update_avatars = 1;
|
||||
m_update_entities = 1;
|
||||
m_statsReporter.SetUpdateMS(3000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
frameMS = System.Environment.TickCount;
|
||||
try
|
||||
{
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
private bool m_newForce = false;
|
||||
private bool m_newCoarseLocations = true;
|
||||
private bool m_gotAllObjectsInScene = false;
|
||||
|
||||
|
||||
// Default AV Height
|
||||
private float m_avHeight = 127.0f;
|
||||
@@ -354,7 +355,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
RegisterToEvents();
|
||||
SetDirectionVectors();
|
||||
|
||||
m_scene.LandManager.sendLandUpdate(this);
|
||||
m_scene.LandManager.sendLandUpdate(this, true);
|
||||
}
|
||||
|
||||
public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams,
|
||||
|
||||
@@ -124,6 +124,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_report.Enabled = true;
|
||||
}
|
||||
|
||||
public void SetUpdateMS(int ms)
|
||||
{
|
||||
statsUpdatesEveryMS = ms;
|
||||
statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000);
|
||||
m_report.Interval = statsUpdatesEveryMS;
|
||||
}
|
||||
|
||||
private void statsHeartBeat(object sender, EventArgs e)
|
||||
{
|
||||
m_report.Enabled = false;
|
||||
|
||||
Reference in New Issue
Block a user