From 35f14a262dfa3d9199f554154a63f5f532460f56 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Feb 2012 03:44:15 +0000 Subject: Remove checks on ban list expiry on every move. To be re-added on parcel boundary crossing only as soon as I'm properly awake. This should fix recent performance issues --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 3b4336f..d86d50e 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -418,8 +418,8 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsBannedFromLand(UUID avatar) { - ExpireAccessList(); - +// ExpireAccessList(); +// if (m_scene.Permissions.IsAdministrator(avatar)) return false; @@ -447,8 +447,8 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsRestrictedFromLand(UUID avatar) { - ExpireAccessList(); - +// ExpireAccessList(); +// if (m_scene.Permissions.IsAdministrator(avatar)) return false; -- cgit v1.1 From 8923ad755d97d5ddb4a29cb6f543b53195f0b461 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Feb 2012 04:03:32 +0000 Subject: Check ban list for a particular parcel only when an avatar moves into it. This restores functionality remove in the last commit without reintroducing the performance penalty. --- .../CoreModules/World/Land/LandManagementModule.cs | 17 +++++++++++++++++ OpenSim/Region/CoreModules/World/Land/LandObject.cs | 4 ---- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 1c503aa..00ac44d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -389,6 +389,8 @@ namespace OpenSim.Region.CoreModules.World.Land { if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT) { + ExpireAccessList(parcelAvatarIsEntering); + if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID)) { SendYouAreBannedNotice(avatar); @@ -1711,5 +1713,20 @@ namespace OpenSim.Region.CoreModules.World.Land MainConsole.Instance.Output(report.ToString()); } + + private void ExpireAccessList(ILandObject land) + { + List delete = new List(); + + foreach (LandAccessEntry entry in land.LandData.ParcelAccessList) + { + if (entry.Expires != 0 && entry.Expires < Util.UnixTimeSinceEpoch()) + delete.Add(entry); + } + foreach (LandAccessEntry entry in delete) + land.LandData.ParcelAccessList.Remove(entry); + + m_scene.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); + } } } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index d86d50e..9aff86c 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -418,8 +418,6 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsBannedFromLand(UUID avatar) { -// ExpireAccessList(); -// if (m_scene.Permissions.IsAdministrator(avatar)) return false; @@ -447,8 +445,6 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsRestrictedFromLand(UUID avatar) { -// ExpireAccessList(); -// if (m_scene.Permissions.IsAdministrator(avatar)) return false; -- cgit v1.1 From 0904772a6f14e4f03d199d8def063d6fb16414eb Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Feb 2012 20:12:35 +0000 Subject: Revert "Check ban list for a particular parcel only when an avatar moves into it." This reverts commit 8923ad755d97d5ddb4a29cb6f543b53195f0b461. --- .../CoreModules/World/Land/LandManagementModule.cs | 17 ----------------- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 4 ++++ 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 00ac44d..1c503aa 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -389,8 +389,6 @@ namespace OpenSim.Region.CoreModules.World.Land { if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT) { - ExpireAccessList(parcelAvatarIsEntering); - if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID)) { SendYouAreBannedNotice(avatar); @@ -1713,20 +1711,5 @@ namespace OpenSim.Region.CoreModules.World.Land MainConsole.Instance.Output(report.ToString()); } - - private void ExpireAccessList(ILandObject land) - { - List delete = new List(); - - foreach (LandAccessEntry entry in land.LandData.ParcelAccessList) - { - if (entry.Expires != 0 && entry.Expires < Util.UnixTimeSinceEpoch()) - delete.Add(entry); - } - foreach (LandAccessEntry entry in delete) - land.LandData.ParcelAccessList.Remove(entry); - - m_scene.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); - } } } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 9aff86c..d86d50e 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -418,6 +418,8 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsBannedFromLand(UUID avatar) { +// ExpireAccessList(); +// if (m_scene.Permissions.IsAdministrator(avatar)) return false; @@ -445,6 +447,8 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsRestrictedFromLand(UUID avatar) { +// ExpireAccessList(); +// if (m_scene.Permissions.IsAdministrator(avatar)) return false; -- cgit v1.1 From a5fcdde179f41d09e0ff94f23fd84f1766457e69 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Feb 2012 20:12:45 +0000 Subject: Revert "Remove checks on ban list expiry on every move. To be re-added on parcel" This reverts commit 35f14a262dfa3d9199f554154a63f5f532460f56. --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index d86d50e..3b4336f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -418,8 +418,8 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsBannedFromLand(UUID avatar) { -// ExpireAccessList(); -// + ExpireAccessList(); + if (m_scene.Permissions.IsAdministrator(avatar)) return false; @@ -447,8 +447,8 @@ namespace OpenSim.Region.CoreModules.World.Land public bool IsRestrictedFromLand(UUID avatar) { -// ExpireAccessList(); -// + ExpireAccessList(); + if (m_scene.Permissions.IsAdministrator(avatar)) return false; -- cgit v1.1 From 130b1c0665d0439bdf4fe0662ee418c4f7c7e167 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Feb 2012 20:47:02 +0000 Subject: Revert my two quick fixes for the lag issue and put in the real fix, which is to only write to the database if data was changed. I was writing to the db on every step of every avatar. Sure to give us lag, that. --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 3b4336f..d146901 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -1139,7 +1139,8 @@ namespace OpenSim.Region.CoreModules.World.Land foreach (LandAccessEntry entry in delete) LandData.ParcelAccessList.Remove(entry); - m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this); + if (delete.Count > 0) + m_scene.EventManager.TriggerLandObjectUpdated((uint)LandData.LocalID, this); } } } -- cgit v1.1