From 1b13d5c85ec4d2e62c301acfe847c83c4aebce1c Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 22:35:08 -0700 Subject: [PATCH] Hide sync chunk writes behind flag Syncing writes on each write call has terrible performance on harddrives. -DPaper.enable-sync-chunk-writes=true to enable --- .../dedicated/DedicatedServerProperties.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch index 597631a0c3..3d4397fe4b 100644 --- a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch @@ -38,6 +38,15 @@ this.difficulty = (Difficulty) this.get("difficulty", dispatchNumberOrString(Difficulty::byId, Difficulty::byName), Difficulty::getKey, Difficulty.EASY); this.gamemode = (GameType) this.get("gamemode", dispatchNumberOrString(GameType::byId, GameType::byName), GameType::getName, GameType.SURVIVAL); this.levelName = this.get("level-name", "world"); +@@ -137,7 +146,7 @@ + this.maxWorldSize = this.get("max-world-size", (integer) -> { + return Mth.clamp(integer, 1, 29999984); + }, 29999984); +- this.syncChunkWrites = this.get("sync-chunk-writes", true); ++ this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag + this.regionFileComression = this.get("region-file-compression", "deflate"); + this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false); + this.enableStatus = this.get("enable-status", true); @@ -165,15 +174,21 @@ }, WorldPresets.NORMAL.location().toString())); this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack-id", ""), this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", ""));