geforkt von Mirrors/Paper
41647af74c
We cannot put blocking network I/O onto the worldgen threads, this will crash the server if it stalls
24 Zeilen
1.4 KiB
Diff
24 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
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 cc92e2c5e6b62c6a67d0a6534b078e3a6029daf5..26345494ce190b5cd2ab58dd7d4b046796767b20 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
@@ -136,7 +136,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
|
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
|
return Mth.clamp(integer, (int) 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 behind flag
|
|
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
|
|
this.enableStatus = this.get("enable-status", true);
|
|
this.hideOnlinePlayers = this.get("hide-online-players", false);
|