Conversation
|
Please redo by simply changing it so its like NetworkManager.QueuedPacket networkmanager_queuedpacket;
while((networkmanager_queuedpacket = this.i.poll()) != null) {For this, we don't want to comment out, we want to change the lines to help ensure it conflicts on an update. (Conflicts are good for this) |
ca96fce to
fd93597
Compare
fd93597 to
62e4180
Compare
|
Changed PR to completely eliminate the un-needed packet queue. |
|
@Black-Hole this shouldn't conflict because the queue in @stonar96's patch is unused anyway - no idea why it was there to begin with |
|
It's there to queue packets sent before the player completely connects. |
|
After throwing debug checks in all versions, 1.7 -> 1.11, this packet queue has never been used to successfully send a packet. |
|
Merged with 324acd6 |
|
Applying the Anti-Xray-Patch fails very hard here: |
|
@Black-Hole that part can just be removed. As we can see, that change was apparently unneeded to begin with. |
NetworkManager#sendPacket is an extremely hot piece of code - and in one of the methods called, m(), ConcurrentLinkedQueue#isEmpty is called countlessly. We can cut down on these isEmpty() calls by simply checking if poll() is null.
This is pretty minor, but with the frequency in which sendPacket is called, will add up.