diff options
Diffstat (limited to 'Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch')
-rw-r--r-- | Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch b/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch new file mode 100644 index 0000000000..50b4d30c5f --- /dev/null +++ b/Spigot-Server-Patches/0387-Use-more-reasonable-thread-count-default-for-bootstr.patch @@ -0,0 +1,22 @@ +From 1a60b5dbb30c2608e2af7833c00aa29dbb141e20 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Tue, 23 Oct 2018 23:14:38 -0400 +Subject: [PATCH] Use more reasonable thread count default for bootstrap + + +diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java +index ee40bccf63..db9af361d6 100644 +--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java ++++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java +@@ -21,7 +21,7 @@ public class DataConverterRegistry { + + a(datafixerbuilder); + // CraftBukkit start +- ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(Runtime.getRuntime().availableProcessors(), 2))); ++ ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)))); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads + DataFixer fixer = datafixerbuilder.build(pool); + pool.shutdown(); + return fixer; +-- +2.21.0 + |