mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-20 01:25:21 +01:00
e4602b6d48
This patch appears to be no longer relevant, and is seemingly a leading cause of datapack performance being horrific
23 lines
910 B
Diff
23 lines
910 B
Diff
From 0adf0a54a9c7fecea654294f0b8a33dae051d6e2 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/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
|
index 7e224ebef..dc6d03062 100644
|
|
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
|
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
|
@@ -66,7 +66,7 @@ public class SystemUtils {
|
|
}
|
|
|
|
private static ExecutorService k() {
|
|
- int i = MathHelper.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 7);
|
|
+ int i = Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
|
|
Object object;
|
|
|
|
if (i <= 0) {
|
|
--
|
|
2.25.1
|
|
|