Add debug mechanism for only sending 1 in N AgentUpdate packets to child agents.

Allows experiments in manually reducing updates under heavy load.
Activated by "debug scene set client-upd-per" console command.
In a simple test, can send as few as every 4th update before observed movement starts becoming disturbingly rubber-banded.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-07-29 18:09:11 +01:00
parent 5cd21516a4
commit 0f87a99e54
3 changed files with 30 additions and 1 deletions

View File

@@ -100,6 +100,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
+ "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
+ "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
+ "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
+ "client-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
+ "collisions - if false then collisions with other objects are turned off.\n"
+ "pbackup - if false then periodic scene backup is turned off.\n"
+ "physics - if false then all physics objects are non-physical.\n"
@@ -119,6 +120,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
+ "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
+ "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
+ "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
+ "client-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
+ "collisions - if false then collisions with other objects are turned off.\n"
+ "pbackup - if false then periodic scene backup is turned off.\n"
+ "physics - if false then all physics objects are non-physical.\n"
@@ -153,6 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
cdl.AddRow("client-pos-upd", m_scene.ClientPositionUpdateTolerance);
cdl.AddRow("client-rot-upd", m_scene.ClientRotationUpdateTolerance);
cdl.AddRow("client-vel-upd", m_scene.ClientVelocityUpdateTolerance);
cdl.AddRow("client-upd-per", m_scene.ChildTerseUpdatePeriod);
cdl.AddRow("pbackup", m_scene.PeriodicBackup);
cdl.AddRow("physics", m_scene.PhysicsEnabled);
cdl.AddRow("scripting", m_scene.ScriptsEnabled);
@@ -245,6 +248,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
m_scene.ClientVelocityUpdateTolerance = newValue;
}
if (options.ContainsKey("client-upd-per"))
{
int newValue;
// FIXME: This can only come from the console at the moment but might not always be true.
if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["client-upd-per"], out newValue))
m_scene.ChildTerseUpdatePeriod = newValue;
}
if (options.ContainsKey("pbackup"))
{
bool active;