ProtocolLib

3M Downloads

Performance issue when migrating from 4.x to 5.x

MWHunter opened this issue ยท 3 comments

commented

There is a regression in PacketFilterManager.getEntityFromId()

4.x: https://spark.lucko.me/GhXCKfywf8
5.x dev builds: https://spark.lucko.me/tMHRwu8MF8

I don't see why Bukkit.getEntity can't be used directly, as ProtocolLib sync's packets on the main thread

commented

We know that the issue is there and I will take a look soon-ish. I don't really know what you mean by Bukkit.getEntity as there is only getEntity(UUID) and World#getEntity(id) doesn't exist as well.

(And we're also supporting async packet listeners)

commented

Oh, I really though bukkit had a method. The NMS world does have that method at least.

commented

Yea thats the case, but iirc there is an issue with two methods - one including entity parts (like EnderDragonPart) and one does not. I thinks thats why we're currently stale on that but maybe I can figure out a nice solution for that in the next days ;)