You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem with cache is that the buffers will tend to be very short lived. Take for instance a position update packet: it needs to be rebuilt very often and only sent at a point in time, to all players around. But once it is sent, there is no point in keeping it in memory.
The only exception I could think of would be the map_chunk packets, that are fairly large, not modified very often and need to be sent to every new player coming in the area. But I think if we want to do some chunk packet caching, it makes more sense to handle that one in prismarine-chunks
Basically use client.writeRaw + a convenient way to encode packets only once.
use case : https://github.com/PrismarineJS/flying-squid/blob/master/src/lib/plugins/world.js#L62
(@Karang idea)
would make server implementations faster
The text was updated successfully, but these errors were encountered: