From 1c6f9f410f4a592f89c64f4ebacae0214caf282a Mon Sep 17 00:00:00 2001 From: zhangyuheng Date: Tue, 28 May 2024 19:54:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BC=93=E5=AD=98=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/main/java/cn/lunadeer/dominion/Cache.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index dac52f6..d608f79 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.lunadeer Dominion - 1.28.11-beta + 1.28.12-beta jar Dominion diff --git a/src/main/java/cn/lunadeer/dominion/Cache.java b/src/main/java/cn/lunadeer/dominion/Cache.java index c2e7988..2ce2295 100644 --- a/src/main/java/cn/lunadeer/dominion/Cache.java +++ b/src/main/java/cn/lunadeer/dominion/Cache.java @@ -228,7 +228,8 @@ public class Cache { } private List getDominionsParentAndChildren(Location loc) { - // todo: 需要进一步优化性能,考虑将领地按照mca文件分组,减少遍历次数 + // todo: 可能需要进一步优化性能,考虑将领地按照mca文件分组,减少遍历次数 + long start = System.currentTimeMillis(); String world = loc.getWorld().getName(); List dominions_id = world_dominions.get(world); List in_dominions = new ArrayList<>(); @@ -240,6 +241,8 @@ public class Cache { } } in_dominions.sort(Comparator.comparingInt(DominionDTO::getId)); + long end = System.currentTimeMillis(); + // XLogger.debug("getDominionsParentAndChildren: %d ms", end - start); return in_dominions; }