aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2019-09-29 13:01:21 -0700
committerZach <[email protected]>2019-09-29 15:01:21 -0500
commit27fca92fa13b0142b447d4919e2750afa644fc84 (patch)
tree904b012f2779598915c059ced5d0f0cb14a21982
parente4e80f8aa7a62d885c0823740f7d40635728742b (diff)
downloadPaper-27fca92fa13b0142b447d4919e2750afa644fc84.tar.gz
Paper-27fca92fa13b0142b447d4919e2750afa644fc84.zip
Drop Optimize-GameRules-to-use-LinkedHashMap (#2594)
Mojang has since replicated the logic
-rw-r--r--Spigot-Server-Patches/0374-Optimize-GameRules-to-use-LinkedHashMap.patch25
1 files changed, 0 insertions, 25 deletions
diff --git a/Spigot-Server-Patches/0374-Optimize-GameRules-to-use-LinkedHashMap.patch b/Spigot-Server-Patches/0374-Optimize-GameRules-to-use-LinkedHashMap.patch
deleted file mode 100644
index 60df788a9f..0000000000
--- a/Spigot-Server-Patches/0374-Optimize-GameRules-to-use-LinkedHashMap.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 26aaafb89179c1b8d19ed21a8ebe9cd913b1fd15 Mon Sep 17 00:00:00 2001
-From: Spottedleaf <[email protected]>
-Date: Thu, 4 Apr 2019 17:55:05 -0700
-Subject: [PATCH] Optimize GameRules to use LinkedHashMap
-
-Previously TreeMap was used which has poor get(K) performance.
-
-diff --git a/src/main/java/net/minecraft/server/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java
-index 45d5675adf..58b3d0ec93 100644
---- a/src/main/java/net/minecraft/server/GameRules.java
-+++ b/src/main/java/net/minecraft/server/GameRules.java
-@@ -21,9 +21,7 @@ import org.apache.logging.log4j.Logger;
- public class GameRules {
-
- private static final Logger LOGGER = LogManager.getLogger();
-- private static final Map<GameRules.GameRuleKey<?>, GameRules.GameRuleDefinition<?>> z = Maps.newTreeMap(Comparator.comparing((gamerules_gamerulekey) -> {
-- return gamerules_gamerulekey.a;
-- }));
-+ private static final Map<GameRules.GameRuleKey<?>, GameRules.GameRuleDefinition<?>> z = Maps.newLinkedHashMap(); // Paper
- public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> DO_FIRE_TICK = a("doFireTick", GameRules.GameRuleBoolean.b(true));
- public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> MOB_GRIEFING = a("mobGriefing", GameRules.GameRuleBoolean.b(true));
- public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> KEEP_INVENTORY = a("keepInventory", GameRules.GameRuleBoolean.b(false));
---
-2.22.0
-