From b3b80756560c0e04aaba4e1bc36329e31a83becf Mon Sep 17 00:00:00 2001 From: Mag-nus Date: Mon, 29 Apr 2024 20:55:58 -0500 Subject: [PATCH] More aggressively try to split larger landblock groups This also reduces the spacing by 1 which should still be plenty safe. --- Source/ACE.Server/Entity/LandblockGroup.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/ACE.Server/Entity/LandblockGroup.cs b/Source/ACE.Server/Entity/LandblockGroup.cs index 138ee76c6e..d67d29088e 100644 --- a/Source/ACE.Server/Entity/LandblockGroup.cs +++ b/Source/ACE.Server/Entity/LandblockGroup.cs @@ -29,7 +29,7 @@ public class LandblockGroup : IEnumerable { private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - public const int LandblockGroupMinSpacing = 5; + public const int LandblockGroupMinSpacing = 4; private const int landblockGroupSpanRequiredBeforeSplitEligibility = LandblockGroupMinSpacing * 4; @@ -243,7 +243,11 @@ public List TrySplit() newLandblockGroup = DoTrySplit(); } - NextTrySplitTime = DateTime.UtcNow.Add(TrySplitInterval); + // If we have a very large landblock group that didn't split, we'll try to split it every 1 minute to help reduce server load + if (results.Count == 0 && landblocks.Count >= 200) + NextTrySplitTime = DateTime.UtcNow.AddMinutes(1); + else + NextTrySplitTime = DateTime.UtcNow.Add(TrySplitInterval); uniqueLandblockIdsRemoved.Clear(); return results;