Paper/Spigot-Server-Patches/0172-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch
Shane Freeder b9badbf2bc
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
79f6ba25 Skip tests on default builds
b85cc32f Further discourage World.regenerateChunk

CraftBukkit Changes:
7560d3b5 Skip tests on default builds
d0a9130d SPIGOT-4563: Fix regenerating chunks saved to disk already

Spigot Changes:
8173d06f Remove need for redundant second clone of repositories
8ede0393 Rebuild patches
2019-01-04 19:19:36 +00:00

23 lines
1.2 KiB
Diff

From 241fe427ab94754bd7f745cf4b9acb07a5a91aa9 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 7 Feb 2017 16:55:35 -0600
Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 299776728..41926a361 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -313,7 +313,7 @@ public class ChunkProviderServer implements IChunkProvider {
// Spigot start
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
activityAccountant.startActivity(0.5);
- int targetSize = (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR);
+ int targetSize = Math.min(this.unloadQueue.size() - 100, (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive
// Spigot end
Iterator<Long> iterator = this.unloadQueue.iterator();
--
2.20.1