Description

Mob AI seems to be the most important cause of performance issues (especially cod AI when near water).

I've created three debug report under three circumstances:

Swimming in an ocean - 8.98 ticks per second, ~25 FPS

Walking on land - 16.79 ticks per second ~50 FPS

Walking on land with doMobSpawning and doMobLoot both set to false, with a custom datapack that runs

tp @e[type=!player] 0 0 0

then

kill @e[type=!player]

every tick. - 18.83 ticks per second ~55 FPS, often above 70

In case #1, cods seem to account for 52.53% of the tick time.
In case #2, no type of mob seem to take more than 13.30% of the tick time.
In case #3, chunkSource takes the longest but the game is now playable.