Commit graph

6 Commits

Autor SHA1 Nachricht Datum
Aikar
f37381ea8a
Optimize Network Manager to not need synchronization
Removes synchronization from sending packets
Makes normal packet sends no longer need to be wrapped and queued like it use to work.
Adds more packet queue immunities on top of keep alive to let the following scenarios go out
without delay:
  - Keep Alive
  - Chat
  - Kick
  - All of the packets during the Player Joined World event

Hoping that latter one helps join timeout issues more too for slow connections.

Removes processing packet queue off of main thread
  - for the few cases where it is allowed, order is not necessary nor
    should it even be happening concurrently in first place (handshaking/login/status)

Ensures packets sent asynchronously are dispatched on main thread

This helps ensure safety for ProtocolLib as packet listeners
are commonly accessing world state. This will allow you to schedule
a packet to be sent async, but itll be dispatched sync for packet
listeners to process.

This should solve some deadlock risks

This may provide a decent performance improvement because thread synchronization incurs a cache reset
so by avoiding ever entering a synchronized block, we get to avoid that, and packet sending is a really
hot activity.
2020-05-06 05:28:47 -04:00
Ytnoos
bf698865f7
Revert "Re-track players that dismount from other players" 2020-04-22 03:16:31 -04:00
Aikar
f26362afa4
Load Spawn Chunks Asynchronously and Spiral Out
Ensures absolute center is first in priority
Speeds up server startup
2020-04-19 06:01:07 -04:00
Aikar
bdcc31caad
Let invalid positioned entities clean up previous chunk by the chunkCheck
I had did a few of the operations myself, which would have broken chunkCheck
from doing it itself, which would leave some state left in the original chunk
and thats not good....
2020-04-12 22:55:43 -04:00
Aikar
748e6447e3
Improve the don't save entities patch per leafs feedback 2020-04-12 18:29:52 -04:00
Aikar
586ee2bb11
Remove patch for MC-111480, fixed in 1.14
We were now starting entities at ID 2
2020-04-11 20:39:21 -04:00