Optimize Spare Chunk loads to be removed faster

this has technically been a longer standing problem, but if an async
chunk loads after a chunk has been removed from the chunk map, it would
be treated as any other spare chunk and kept loaded until Chunk GC kicks in.

This fixes that, but also obsoletes ChunkGC in that anytime we load a spare
chunk (a chunk outside of any players view distance), we will immediately
mark it for unload.

This should reduce the amount of spare chunks loaded on a server.
This commit is contained in:
Aikar
2018-09-30 20:34:05 -04:00
parent 424d794178
commit 065868036c
5 changed files with 58 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ index af69342e6c..ca7efc9175 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 3f4a8f21c0..f8d8a44a88 100644
index abf5a7554d..84896d6f6b 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -0,0 +0,0 @@ public class PlayerChunk {