Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
a7f924c2ca
Fixed upstream
23 Zeilen
1.2 KiB
Diff
23 Zeilen
1.2 KiB
Diff
From e7e7be9caf3f4b51a3053cce17d929f9e4235b16 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 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.20.1
|
|
|