hpfxd / PandaSpigot

Fork of Paper for 1.8.8 focused on improved performance and stability.
GNU General Public License v3.0
239 stars 65 forks source link

Removing CancelledPacketHandleException #96

Open Mercenarioo opened 1 year ago

Mercenarioo commented 1 year ago

Is CancelledPacketHandleException needed? Doesn't throwing the exception on every incoming packet cause performance problems? Thanks for answer!

ghost commented 1 year ago

Is a cached exception

Mercenarioo commented 1 year ago

It is cached, but it's unnecessary code that is being launched on every incoming packet.

ghost commented 1 year ago

It is cached, but it's unnecessary code that is being launched on every incoming packet.

By removing that code you're adding a chance to break some random NMS plugin

ghost commented 1 year ago

Actually tested this change, packets are sent asynchronous without the exception causing all events being asynchronous, you can't even join the server