summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-10-23 20:34:30 +1100
committermd_5 <git@md-5.net>2018-10-23 20:34:30 +1100
commit3359cb1998507ec5628957115568eaaf01d70ed0 (patch)
tree1c037ba71b12331d02063c6b5caa39c8c635d0ea
parentb4230a9a7efde35b30fefdb4a2492209d5334def (diff)
downloadcraftbukkit-3359cb1998507ec5628957115568eaaf01d70ed0.tar
craftbukkit-3359cb1998507ec5628957115568eaaf01d70ed0.tar.gz
craftbukkit-3359cb1998507ec5628957115568eaaf01d70ed0.tar.lz
craftbukkit-3359cb1998507ec5628957115568eaaf01d70ed0.tar.xz
craftbukkit-3359cb1998507ec5628957115568eaaf01d70ed0.zip
MC-137353: Don't go crazy on amount of bootstrap threads needed
-rw-r--r--nms-patches/DataConverterRegistry.patch16
1 files changed, 15 insertions, 1 deletions
diff --git a/nms-patches/DataConverterRegistry.patch b/nms-patches/DataConverterRegistry.patch
index 98231b52..c09a8ab1 100644
--- a/nms-patches/DataConverterRegistry.patch
+++ b/nms-patches/DataConverterRegistry.patch
@@ -1,6 +1,20 @@
--- a/net/minecraft/server/DataConverterRegistry.java
+++ b/net/minecraft/server/DataConverterRegistry.java
-@@ -185,6 +185,18 @@
+@@ -21,7 +21,12 @@
+ DataFixerBuilder datafixerbuilder = new DataFixerBuilder(1631);
+
+ a(datafixerbuilder);
+- return datafixerbuilder.build(ForkJoinPool.commonPool());
++ // CraftBukkit start
++ ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(Runtime.getRuntime().availableProcessors(), 2)));
++ DataFixer fixer = datafixerbuilder.build(pool);
++ pool.shutdown();
++ return fixer;
++ // CraftBukkit end
+ }
+
+ public static DataFixer a() {
+@@ -185,6 +190,18 @@
datafixerbuilder.addFixer(new DataConverterItemFrame(schema46, false));
Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.b);