Major performance loss from Entity Lookups via ProtocolLib packet interception

Summary

The way PL fetches entities seems to be significantly worse in 1.18. In my plugin I used the same code to fetch an entity from the various entity-based packets. In 1.18, this results in a full iteration over all entities in a world with even loaded chunk checks:

image

Priority

Quite high, I had to turn off MM on my SMP servers in order to prevent major TPS loss.

Implementation!

At the moment you can use NMS to get the entity(ies) via ID directly (In my case, was using ProtocolWrapper): image

Edited Apr 06, 2022 by Cryptite
Assignee Loading
Time tracking Loading