The Hordes

The Hordes

5M Downloads

Possible Optimization on Pathfinding

TqLxQuanZ opened this issue · 3 comments

commented

This most likely won't be implemented or fixed, but I would still suggest if there's a possible way, add a config to set the interval of the pathfinding update to be lesser, because on a big multiplayer server, the horde pathfinding is actually cost quite some performance and making the TPS dropping.

Here's the spark profile if interested:
https://spark.lucko.me/mfXPzwGiuG

image

commented

I've noticed the same:
https://spark.lucko.me/iS9VOYGTJL

image
image

commented

In version 1.20.1-1.3.1, I've tweaked the default interval between pathing checks to 10 and added that value to be configurable in the config file.

I've also added a random offset for the pathing tasks, so hopefully less calculations should be taking place in a single tick.

This changes the behaviour slightly but seems to be much better on performance.

commented

That's great to hear! Will there be any possibility of backporting to 1.18.2? @SmileycorpMC
There seems to be a lot of cool changes on 1.3.1.