mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Make chunk unload targetSize more aggressive
Re: GH-597
This commit is contained in:
parent
3f2569f79f
commit
75618c5da8
2 changed files with 20 additions and 37 deletions
|
@ -1,37 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
||||||
Date: Tue, 7 Feb 2017 16:55:35 -0600
|
|
||||||
Subject: [PATCH] Disable Spigot chunk unload rate throttling
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
||||||
index 7006466b5..695c9bd2a 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
|
||||||
if (!this.unloadQueue.isEmpty()) {
|
|
||||||
// Spigot start
|
|
||||||
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
|
|
||||||
- activityAccountant.startActivity(0.5);
|
|
||||||
+ //activityAccountant.startActivity(0.5); // Paper
|
|
||||||
int targetSize = (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR);
|
|
||||||
// Spigot end
|
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
|
||||||
// CraftBukkit end
|
|
||||||
|
|
||||||
// Spigot start
|
|
||||||
- if (this.unloadQueue.size() <= targetSize && activityAccountant.activityTimeIsExhausted()) {
|
|
||||||
+ if (false && this.unloadQueue.size() <= targetSize && activityAccountant.activityTimeIsExhausted()) { // Paper - Disable for the time being
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Spigot end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- activityAccountant.endActivity(); // Spigot
|
|
||||||
+ //activityAccountant.endActivity(); // Spigot // Paper
|
|
||||||
}
|
|
||||||
// Paper start - delayed chunk unloads
|
|
||||||
long now = System.currentTimeMillis();
|
|
||||||
--
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
From 0000000000000000000000000000000000000000 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 7006466b5..c32fb3ef5 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
|
@@ -0,0 +0,0 @@ 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 iterator = this.unloadQueue.iterator();
|
||||||
|
--
|
Loading…
Reference in a new issue