4 Commits

Author SHA1 Message Date
Dylan T
946c2fbacc
Ticking chunks rewrite (#5689)
This API is much more flexible than the old, allowing any arbitrary set of chunks to be ticked.

These changes also improve the performance of random chunk ticking by almost entirely eliminating the cost of chunk selection. Ticking chunks are now reevaluated when a player moves, instead of every tick.

The system also does not attempt to check the same chunks twice, leading to further improvements.

Overall, the overhead of random chunk selection is reduced anywhere from 80-96%. In practice, this can offer a 5-10% performance gain for servers with sparsely distributed players.
2023-04-11 20:01:19 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
adbc58f326
TickingChunkLoader: use native return types 2021-03-26 22:55:48 +00:00
Dylan K. Taylor
c092a2e836
Separate TickingChunkLoader from ChunkLoader
this makes it possible to keep chunks loaded without ticking them.
2021-03-18 23:19:27 +00:00