From c739e545f27855ed5ddd3dec937b6a27c8e61acd Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sat, 25 Oct 2025 19:35:32 +1000 Subject: [PATCH] balance lru capacity with respect to the number of currently loaded sections --- .../cortex/voxy/common/world/ActiveSectionTracker.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/me/cortex/voxy/common/world/ActiveSectionTracker.java b/src/main/java/me/cortex/voxy/common/world/ActiveSectionTracker.java index be1044e0..fdee730a 100644 --- a/src/main/java/me/cortex/voxy/common/world/ActiveSectionTracker.java +++ b/src/main/java/me/cortex/voxy/common/world/ActiveSectionTracker.java @@ -113,12 +113,22 @@ public class ActiveSectionTracker { long stamp2 = lock.readLock(); long stamp = this.lruLock.writeLock(); section = this.lruSecondaryCache.remove(key); + + WorldSection removal = null; + if (section == null && this.lruSize+100