Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More aggressively try to split larger landblock groups #4171

Merged
merged 1 commit into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Source/ACE.Server/Entity/LandblockGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class LandblockGroup : IEnumerable<Landblock>
{
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;

Expand Down Expand Up @@ -243,7 +243,11 @@ public List<LandblockGroup> 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;
Expand Down