Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 03:50:08 +01:00
684bd2adbc
--- work/Bukkit Submodule work/Bukkit 9a793cce8..0c1d258bb: > Make PigZapEvent extend EntityTransformEvent --- work/CraftBukkit Submodule work/CraftBukkit ee6684bba..6a398ac44: > SPIGOT-4511: Trident doesn't lose durability > Tweak outdated windows
23 Zeilen
1.2 KiB
Diff
23 Zeilen
1.2 KiB
Diff
From 8f2fdc5080f1ed159479a906fff4089c524d6c5f Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
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 e15b6da82..021fc0fc1 100644
|
|
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
|
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
|
@@ -22,7 +22,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.19.1
|
|
|