diff options
Diffstat (limited to 'patches/unapplied/server/0366-Hide-sync-chunk-writes-behind-flag.patch')
-rw-r--r-- | patches/unapplied/server/0366-Hide-sync-chunk-writes-behind-flag.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/patches/unapplied/server/0366-Hide-sync-chunk-writes-behind-flag.patch b/patches/unapplied/server/0366-Hide-sync-chunk-writes-behind-flag.patch new file mode 100644 index 0000000000..8703d3b68a --- /dev/null +++ b/patches/unapplied/server/0366-Hide-sync-chunk-writes-behind-flag.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf <[email protected]> +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 + +diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +index 83d279a66484dfeef3ce34bef3d1c8f221c67f6d..a2633780619d73c29a23cb8b6a208ca9ba549fb0 100644 +--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java ++++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +@@ -146,7 +146,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie + 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); |