From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 8 Apr 2020 21:24:05 -0400 Subject: [PATCH] Increase Light Queue Size Wiz mentioned that large WorldEdit operations cause light to run on main thread. The queue was small, set to 5.. this bumps it to 20 but makes it configurable per-world. The main risk of increasing this higher is during shutdown, some queued light updates may be lost because mojang did not flush the light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 1dba00531e909214119219e928b2875676c00e75..7a97a4a395f20680bc3b028586c9a17b84783d99 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -513,5 +513,10 @@ public class PaperWorldConfig { hoppersIgnoreOccludingBlocks = getBoolean("hopper.ignore-occluding-blocks", hoppersIgnoreOccludingBlocks); log("Hopper Ignore Occluding Blocks: " + (hoppersIgnoreOccludingBlocks ? "enabled" : "disabled")); } + + public int lightQueueSize = 20; + private void lightQueueSize() { + lightQueueSize = getInt("light-queue-size", lightQueueSize); + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 4661d571cd4047c6b7d76de7ba0cb34ada348d63..758a972589b607447dc507c6c4f4b2a62f6a2832 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -812,7 +812,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop