mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
MC-137353: Don't go crazy on amount of bootstrap threads needed
This commit is contained in:
parent
b4230a9a7e
commit
3359cb1998
1 changed files with 15 additions and 1 deletions
|
@ -1,6 +1,20 @@
|
||||||
--- a/net/minecraft/server/DataConverterRegistry.java
|
--- a/net/minecraft/server/DataConverterRegistry.java
|
||||||
+++ b/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));
|
datafixerbuilder.addFixer(new DataConverterItemFrame(schema46, false));
|
||||||
Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.b);
|
Schema schema47 = datafixerbuilder.addSchema(1458, DataConverterRegistry.b);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue