Leashed horses will cause serious performance issues
Timings or Profile link
https://timings.aikar.co/dev/?id=a2e746151ef44bc28b335d200c0c44f2
Description of issue
In certain cases, Leashed horses will cause serious performance issues Other animals probably do too, but it's not as obvious
- Facing west (other orientations are not acceptable)
- Place blocks as shown in the figure below, and put the horse on the same position, and hitch it
- View mspt performance usage
Same map file: world.zip
Plugin and Datapack List
plugins [08:41:02 INFO]: Plugins (0): datapack list [08:41:08 INFO]: There are 2 data packs enabled: [vanilla (built-in)], [file/bukkit (world)] [08:41:08 INFO]: There are no more data packs available
Server config files
Use the default configuration file
Paper version
[08:41:43 INFO]: Checking version, please wait... [08:41:44 INFO]: This server is running Paper version git-Paper-281 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 55a16d8) You are running the latest version
Other
Spark link:https://spark.lucko.me/HgEfAIJk5y Create on Purpur
I've been seeing similar results from my own testing:
Control:

Horses facing South East from post they're tied to:
https://timings.aikar.co/dev/?id=14d2b56b07bf43f4bf5b5157e5a67a32
Horses facing North West from post they're tied to:
https://timings.aikar.co/dev/?id=acb312d293284ba78cd9c0f22a9d08fa
Tests were done with 18 horses [16:20:56 INFO]: This server is running Paper version git-Paper-445 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 4d7269e) plugins Plugins (0): There are 2 data packs enabled: [vanilla (built-in)], [file/bukkit (world)]
I am able to reproduce this issue, with horses facing North/West specifically. The difference is very small however, even with a significantly higher number of horses (200). Spark with horses going south/east vs. north/west. Its not really an issue with horses specifically, pathfinding seems to be slightly slower in the North/West direction in general. Leashed horses just make it obvious because they strictly pathfind towards where they are attached to a fence post.
Hello, Still nobody found a way to improve that ? Or it was just forgotten On some servers, players just leash animals to fence to reproduce them easily, and this cause some performances issues compared to non leashed animals :/
It's a low priority issue and all the sparks have expired