From 529c4f9f90f923f31c39091ca304bc4a330eda74 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 27 Jul 2020 23:01:56 -0400 Subject: [PATCH] Remove ability to disable async chunks unless single core cpu Too many people try to disable async chunks thinking its the cure to some mysterious problem. It is not possible to fully disable async chunks, and the portion that this config controls is so minor in the grand scheme of things. People are needlessly hurting their server following bad advice, so just kill this config except for the people who might actually benefit from it. --- .../Asynchronous-chunk-IO-and-loading.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch index 5edd11e6e3..575769171b 100644 --- a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch @@ -218,9 +218,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private static void asyncChunks() { + ConfigurationSection section; + if (version < 15) { -+ boolean enabled = config.getBoolean("settings.async-chunks", true); + section = config.createSection("settings.async-chunks"); -+ section.set("enable", enabled); + section.set("threads", -1); + } else { + section = config.getConfigurationSection("settings.async-chunks"); @@ -236,9 +234,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + section.set("load-threads", null); + } + section.set("generation", null); ++ section.set("enabled", null); + section.set("thread-per-world-generation", null); + -+ asyncChunks = getBoolean("settings.async-chunks.enable", true); + int threads = getInt("settings.async-chunks.threads", -1); + int cpus = Runtime.getRuntime().availableProcessors(); + if (threads <= 0) { @@ -246,6 +244,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + if (cpus == 1 && !Boolean.getBoolean("Paper.allowAsyncChunksSingleCore")) { + asyncChunks = false; ++ } else { ++ asyncChunks = true; + } + + // Let Shared Host set some limits