Closed KernelFreeze closed 2 years ago
This doesn't really fix the issue. Player ticks will require the chunks to be loaded in many other places than that, and skipping those can be dangerous (such as, but not limited to falling through the world given the right conditions). Doing this just shifts the issue to the next part of the player tick that requires chunks to be loaded - https://spark.lucko.me/wGkWR37njc.
There are already proper solutions for this specific issue though: VMP (Very Many Players) provides async chunk loading for players on login, and when going through nether portals. ServerCore has a configurable option to prevent players from moving into unloaded chunks.
Oh, well, closing the pull request in that case.
Hello! I added a new Mixin that prevents sync loads of chunks when an entity ticks (checking if its inside a fluid). This is specially useful when a player joins a world, because it starts ticking immediately and causes cascading lag. We tested this patch on a production server for a few months, and it successfully works as intended, decreasing lag without causing further issues.
I found the need for this Mixin using a profiler, this accounts for a large usage of the server tick time.