Don't intern scoreboard player names

This patch was heavily intented to fix a server side issue which
is generally no longer relevant, not to mention the cost of interning
only cements this patch into it's grave
This commit is contained in:
Shane Freeder 2020-05-08 19:40:13 +01:00
parent 331ebbf4f6
commit 2cab85cbef
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
31 changed files with 66 additions and 92 deletions

View File

@ -1,4 +1,4 @@
From 6a36bb4be7ec3ae346ebeb4929db9505c0c240f2 Mon Sep 17 00:00:00 2001
From dbfdcc2838644b29aaf53c59b37ec5cb7a9e6091 Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Wed, 29 Jun 2016 04:29:25 +0200
Subject: [PATCH] Add dynamic server addition/removal api.
@ -311,5 +311,5 @@ index d640313a..115f614e 100644
+ // Waterfall end
}
--
2.25.0
2.26.1

View File

@ -1,26 +0,0 @@
From a584905bd02b9c01d14a04a69666bb41a80ae1ba Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Mon, 25 Apr 2016 23:46:00 -0700
Subject: [PATCH] Reduce the overhead of lots and lots of teams with the same
names
Featherboard (and other bad plugins) use persistent scoreboards (scoreboard.dat), causing every team ever to be sent to waterfall. This is bad, and takes tons of memory.
Uses String.intern() to avoid duplicating strings
diff --git a/api/src/main/java/net/md_5/bungee/api/score/Team.java b/api/src/main/java/net/md_5/bungee/api/score/Team.java
index 849ba1cf..39f81fd1 100644
--- a/api/src/main/java/net/md_5/bungee/api/score/Team.java
+++ b/api/src/main/java/net/md_5/bungee/api/score/Team.java
@@ -29,7 +29,7 @@ public class Team
public void addPlayer(String name)
{
- players.add( name );
+ players.add(name.intern());
}
public void removePlayer(String name)
--
2.22.0

View File

@ -1,4 +1,4 @@
From 7742a95b8a8db9a8be6e6abd6c4c89e39f6e970e Mon Sep 17 00:00:00 2001
From e86cf467adab61a44534cc9ece28770989a5e1c4 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 14 Apr 2019 19:15:00 +0300
Subject: [PATCH] Add callEvent() shortcut to Event
@ -28,5 +28,5 @@ index e2e01ecb..25ec1bd8 100644
+ // Waterfall end
}
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 1bda4c40029c9fd1a017222bdabe5ee9cb65afaf Mon Sep 17 00:00:00 2001
From 7fc91ed18f34eea6e1deada28cf9800af2635a68 Mon Sep 17 00:00:00 2001
From: Nathan Poirier <nathan@poirier.io>
Date: Tue, 28 Jun 2016 23:00:49 -0500
Subject: [PATCH] Improve ServerKickEvent
@ -146,5 +146,5 @@ index 6598781b..d1654bcc 100644
{
con.connectNow( event.getCancelServer(), ServerConnectEvent.Reason.KICK_REDIRECT );
--
2.26.0
2.26.1

View File

@ -1,4 +1,4 @@
From 0114656f571bde36d57728d61b7a7131b3584866 Mon Sep 17 00:00:00 2001
From d9effb447d71585fa7badd7d3f55e785f589c2a4 Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Wed, 29 Jun 2016 13:56:57 -0500
Subject: [PATCH] Configurable server version in ping response
@ -79,5 +79,5 @@ index 8fe80fd6..eba0cbd1 100644
@Override
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From 90b458f4915b37108a21fcaaf2d29dabf53c4185 Mon Sep 17 00:00:00 2001
From b7b31dfb797e512a5b58b730a2db3f29a05ba775 Mon Sep 17 00:00:00 2001
From: Ichbinjoe <joe@ibj.io>
Date: Sat, 16 Jul 2016 20:44:01 -0400
Subject: [PATCH] Add timeout variant to connect methods
@ -75,7 +75,7 @@ index 867e4428..f7459860 100644
* Connects / transfers this user to the specified connection, gracefully
* closing the current one. Depending on the implementation, this method
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index 51aed6da..c270cd77 100644
index ecde76ec..2c689edf 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -254,9 +254,20 @@ public final class UserConnection implements ProxiedPlayer
@ -109,5 +109,5 @@ index 51aed6da..c270cd77 100644
{
disconnect( bungee.getTranslation( "fallback_kick", future.cause().getClass().getName() ) );
--
2.26.2.windows.1
2.26.1

View File

@ -1,4 +1,4 @@
From 676d9efac23847cd502a244c85c10ebece3455b6 Mon Sep 17 00:00:00 2001
From 05394782ec180a43a827538f0dee0ae705dec2c2 Mon Sep 17 00:00:00 2001
From: minecrafter <unknown@unknown>
Date: Sun, 3 Jul 2016 04:03:21 -0400
Subject: [PATCH] Proxy query event
@ -211,5 +211,5 @@ index 9b81197f..ac99d02c 100644
} else
{
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 638c2dead03891867bded50eb96c3d074ff0b99e Mon Sep 17 00:00:00 2001
From c59995528d7529b70f4c8b323762b6afb01da957 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Thu, 4 Aug 2016 19:30:49 -0700
Subject: [PATCH] Dump the raw hex of a packet on a decoding error
@ -53,5 +53,5 @@ index 5b32effe..9e9ea49c 100644
{
if ( slice != null )
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From c3b8811c3d1eba74e281a68ffca69f8abbd52e73 Mon Sep 17 00:00:00 2001
From 14aad6dcfb2d749c4d0dc58c49220b2c59896107 Mon Sep 17 00:00:00 2001
From: Aaron Hill <aa1ronham@gmail.com>
Date: Thu, 15 Sep 2016 22:38:37 +0200
Subject: [PATCH] Fix potion race condition on Forge 1.8.9
@ -169,7 +169,7 @@ index 00000000..7ed2dc3a
+ }
+}
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index 3f55af3d..ee4ede23 100644
index 2c689edf..0c36ab52 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -1,7 +1,9 @@
@ -277,5 +277,5 @@ index d15044f4..bea2bbff 100644
* Sends the server mod list to the client, or stores it for sending later.
*
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From 8d2ad56ecddfa2089184fcd4ca92635ffee13004 Mon Sep 17 00:00:00 2001
From 9b4905038437b59bb1348eee4e45051c2c65396e Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Wed, 21 Dec 2016 03:13:03 -0500
Subject: [PATCH] Optionally use async Netty DNS resolver
@ -171,5 +171,5 @@ index e0c52f21..37337429 100644
+ // Waterfall End
}
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From b01f3decf7099e6df46436c73e3c9538cfad54cd Mon Sep 17 00:00:00 2001
From 5c5b84d3d5e4d9940fbc1736a0f016e352e1a36c Mon Sep 17 00:00:00 2001
From: Jamie Mansfield <dev@jamierocks.uk>
Date: Sat, 10 Jun 2017 20:56:02 +0100
Subject: [PATCH] Improve outdated build message
@ -22,5 +22,5 @@ index 4ba0ced5..4c119b9d 100644
Thread.sleep( TimeUnit.SECONDS.toMillis( 10 ) );
}
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 2a7ba258faff6dedbaab0c2dbc5ce1aec78d7339 Mon Sep 17 00:00:00 2001
From defb97c98d4a9bd73b90ca1d4ac4feaf91bbf40d Mon Sep 17 00:00:00 2001
From: Daniel Naylor <git@drnaylor.co.uk>
Date: Mon, 17 Jul 2017 20:24:17 +0100
Subject: [PATCH] Fix some forge plugin message packets not being forwarded
@ -42,7 +42,7 @@ index 52429265..5e02f8c8 100644
}
diff --git a/proxy/src/main/java/net/md_5/bungee/forge/ForgeServerHandler.java b/proxy/src/main/java/net/md_5/bungee/forge/ForgeServerHandler.java
index 7166d061..b5b9ec70 100644
index 77d18e6d..d254b84e 100644
--- a/proxy/src/main/java/net/md_5/bungee/forge/ForgeServerHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/forge/ForgeServerHandler.java
@@ -50,7 +50,7 @@ public class ForgeServerHandler
@ -55,5 +55,5 @@ index 7166d061..b5b9ec70 100644
synchronized ( packetQueue )
{
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From ff4d92a33380ea2c3a274f84f948c975cdca1839 Mon Sep 17 00:00:00 2001
From c80f530476acd698a1ad345bc8f8de8b5dc2d77b Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 12:46:47 +0200
Subject: [PATCH] Use Log4j2 for logging and TerminalConsoleAppender for
@ -233,7 +233,7 @@ index 00000000..93ce3b14
+ </Loggers>
+</Configuration>
diff --git a/pom.xml b/pom.xml
index 19f63586..37bdaf3d 100644
index 872f8fc1..c9531d39 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,6 +56,7 @@
@ -458,5 +458,5 @@ index 10366c88..8c5cc949 100644
}
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From abb3bcba4bb5e0e1cb9ce662880633b8a5aac8df Mon Sep 17 00:00:00 2001
From bc19d3966f696f76fe17a68f4bd2ce1a4de66a96 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 13:07:31 +0200
Subject: [PATCH] Handle plugin prefixes using Log4J
@ -45,5 +45,5 @@ index 93ce3b14..3b3525f0 100644
<TimeBasedTriggeringPolicy />
<OnStartupTriggeringPolicy />
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From 9e78801085e10772415bf79f9806161591071cde Mon Sep 17 00:00:00 2001
From 928c66c38d8e49f7d7f94d88c75a52a8e0282057 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 22 Sep 2017 13:15:09 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
@ -56,5 +56,5 @@ index a044119e..f5267567 100644
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From dca4832c1fa97a4c98229a20e75afd4197c44560 Mon Sep 17 00:00:00 2001
From 490f4b325aec7ae8f93dc463cc199be99795ce05 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Sun, 24 Sep 2017 12:06:49 +0200
Subject: [PATCH] Add Log4j configuration that replicates the old BungeeCord
@ -47,5 +47,5 @@ index 00000000..6e9c09c5
+ </Loggers>
+</Configuration>
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 3d39aab76fcf606f04df1c1e9e500009a2426a87 Mon Sep 17 00:00:00 2001
From 466859125a1f07b0fb151773728af30316d921da Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 26 Sep 2017 18:59:37 +0200
Subject: [PATCH] Add console command completion
@ -102,5 +102,5 @@ index 765d24bc..6cec0b5a 100644
}
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From c9194973b3e932e6f56818fd1d568653b98a45ca Mon Sep 17 00:00:00 2001
From 6dd17f3c079990f577b595797c75f427038aa111 Mon Sep 17 00:00:00 2001
From: phenomax <phenomax@revayd.net>
Date: Thu, 10 Aug 2017 18:41:17 +0200
Subject: [PATCH] Providing access to the player's LoginResult on LoginEvent
@ -65,5 +65,5 @@ index 5c692ef2..1771ff3c 100644
@Override
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From a4f49ca4293a902d4926c7a428bb6aaa131911e3 Mon Sep 17 00:00:00 2001
From 1fe0719a2f66d9af21ba26bdb202021ef6428828 Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com>
Date: Thu, 8 Feb 2018 19:10:52 +0100
Subject: [PATCH] Optionally log InitialHandler connections
@ -77,5 +77,5 @@ index 1771ff3c..007d3daf 100644
ch.setProtocol( Protocol.LOGIN );
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From 0469a99ed97eed64ceb82328541d889572b2179b Mon Sep 17 00:00:00 2001
From 9454adaaeca7ad626b9b0d699694c7fc30bc854c Mon Sep 17 00:00:00 2001
From: Jamie Mansfield <dev@jamierocks.uk>
Date: Mon, 28 May 2018 21:43:55 +0100
Subject: [PATCH] Forge is a first class citizen
@ -31,5 +31,5 @@ index 115f614e..85d2197a 100644
@Synchronized("serversLock") // Waterfall
public void load()
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From bd5e179c3c66f82c335e431905b5a19b47353b3b Mon Sep 17 00:00:00 2001
From c409a5ecb881ba5ef02c8ab7ebc5de55a23755b0 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 12 Oct 2018 14:28:52 +0100
Subject: [PATCH] Ignore empty packets
@ -38,5 +38,5 @@ index e903fd09..25ee2027 100644
throw new CorruptedFrameException( "Empty Packet!" );
}
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 95eb27b9ffc5ed020a048f967eda6d224a4deb28 Mon Sep 17 00:00:00 2001
From ecf5ae72d3194c142b01b49746c67208c338a827 Mon Sep 17 00:00:00 2001
From: creeper123123321 <creeper123123321@gmail.com>
Date: Thu, 17 Jan 2019 03:25:59 +0000
Subject: [PATCH] Don't use a bytebuf for packet decoding
@ -67,5 +67,5 @@ index 25ee2027..743d65e4 100644
}
}
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 4b35a73e97e5397ad49ff7dc9f9618f0a897873c Mon Sep 17 00:00:00 2001
From d5377834246c8b9d93ee383981289e25d0a0e6e4 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 14 Jan 2019 03:35:21 +0000
Subject: [PATCH] Provide an option to disable entity metadata rewriting
@ -57,7 +57,7 @@ index 4ff8da6d..e860214f 100644
+ }
}
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
index 8b3ff379..858b3ae6 100644
index f594a287..35a19224 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -228,7 +228,7 @@ public class ServerConnector extends PacketHandler
@ -121,7 +121,7 @@ index 8b3ff379..858b3ae6 100644
if ( user.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_14 )
{
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
index ee4ede23..7c129221 100644
index 0c36ab52..87cff4ff 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -745,4 +745,10 @@ public final class UserConnection implements ProxiedPlayer
@ -232,5 +232,5 @@ index 00000000..cb81d1dd
+// Waterfall end
\ No newline at end of file
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From e435ea79171606a862522b6fb8ca484b42dc8062 Mon Sep 17 00:00:00 2001
From 5375aa83fd696e3bf64fbacf3509c33dd60ec531 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 14 Mar 2019 07:44:06 +0000
Subject: [PATCH] Add ProxyDefineCommandsEvent
@ -107,5 +107,5 @@ index f845da09..d7d0fafc 100644
LiteralCommandNode dummy = LiteralArgumentBuilder.literal( command.getKey() )
.then( RequiredArgumentBuilder.argument( "args", StringArgumentType.greedyString() )
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From bc5cbc9ac8635443a70d6c4b98500135dcc3a847 Mon Sep 17 00:00:00 2001
From 81ac6733c88e10cc48f33239946d69219fe9abd1 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 20 Mar 2019 21:39:12 -0700
Subject: [PATCH] Use proper max length for serverbound chat packet
@ -72,5 +72,5 @@ index ffcd815c..0ded6739 100644
if ( direction == ProtocolConstants.Direction.TO_CLIENT )
{
--
2.24.0
2.26.1

View File

@ -1,4 +1,4 @@
From 1f214e0f51add45580c27f75825d1516ff438827 Mon Sep 17 00:00:00 2001
From e59ea6c7f36d92f1e7eef0afcf6f91f6e92735df Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 30 Mar 2019 15:11:11 +0000
Subject: [PATCH] Fix upstream javadocs
@ -104,5 +104,5 @@ index f3bced0a..4a198ee9 100644
Favicon getFaviconObject();
--
2.23.0.windows.1
2.26.1

View File

@ -1,4 +1,4 @@
From 35b8e8fb98e03b28a8bd96170c227d540c27087a Mon Sep 17 00:00:00 2001
From 707abf979a99dd603a6e6ae3c701734a44c716f7 Mon Sep 17 00:00:00 2001
From: Colin Godsey <crgodsey@gmail.com>
Date: Tue, 16 Apr 2019 07:25:52 -0600
Subject: [PATCH] OSX native zlib and crypto
@ -329,5 +329,5 @@ literal 0
HcmV?d00001
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From f14e28031815c62e4ac6db77d17646cfb24de55e Mon Sep 17 00:00:00 2001
From 7f97b50764317451f071dffa20673c408a6dfe6c Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 17 Apr 2019 09:24:38 +0300
Subject: [PATCH] Speed up packet construction
@ -357,5 +357,5 @@ index 043e8562..aa1515f4 100644
final int getId(Class<? extends DefinedPacket> packet, int version)
{
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From 0bc727fa43296b49b9826ca9225a28a90d7f26d8 Mon Sep 17 00:00:00 2001
From e47cbe074b7e85808481412366d3d6c186f5119c Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 25 Nov 2019 19:54:06 +0000
Subject: [PATCH] Speed up some common exceptions
@ -157,5 +157,5 @@ index ac99d02c..0c1ecfb8 100644
// Waterfall start
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From bedeffb74e8ac3cfd9940c66b68fd3091c349f90 Mon Sep 17 00:00:00 2001
From d332c9ff37c72dfc44b32e16f43705f900b1fafc Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 2 Dec 2019 11:35:17 +0000
Subject: [PATCH] ConnectionInitEvent
@ -119,5 +119,5 @@ index 8969a5ed..9a39f69e 100644
};
public static final Base BASE = new Base();
--
2.25.0
2.26.1

View File

@ -1,4 +1,4 @@
From 9f488c256a9738d00aca1417cff6765090c877a4 Mon Sep 17 00:00:00 2001
From 7a399e781d556697922a04ff6fd85ca5a5484d4b Mon Sep 17 00:00:00 2001
From: theminecoder <theminecoder.dev@gmail.com>
Date: Wed, 22 Apr 2020 14:00:44 +1000
Subject: [PATCH] Add exception reporting event
@ -695,5 +695,5 @@ index 67db0cc4..02ec98fc 100644
// If we have a period of 0 or less, only run once
--
2.21.0 (Apple Git-122)
2.26.1