Enable chunk caching by default

the footprint of compressed chunk batches is so small now that it doesn't make sense to disable it out of the box. The performance gains from caching chunks are more than worth it.
As of 1.2, the average footprint of these caches is usually ~2% or less of the size of the actual chunk itself. Moving around a lot will frequently cause the same chunks to get sent several times as it passes in and out of your render distance, and the chunk isn't even changing in that time, so the chunk is getting needlessly re-serialized over and over again. So even if your world is not static (for example a creative server) chunk caching will still offer benefits, and the memory expense is so small it's a no-brainer.
This commit is contained in:
Dylan K. Taylor
2017-10-03 13:16:30 +01:00
parent 4be7885ee4
commit 736cc927ff
2 changed files with 2 additions and 2 deletions

View File

@ -337,7 +337,7 @@ class Level implements ChunkManager, Metadatable{
$this->chunkGenerationQueueSize = (int) $this->server->getProperty("chunk-generation.queue-size", 8);
$this->chunkPopulationQueueSize = (int) $this->server->getProperty("chunk-generation.population-queue-size", 2);
$this->clearChunksOnTick = (bool) $this->server->getProperty("chunk-ticking.clear-tick-list", true);
$this->cacheChunks = (bool) $this->server->getProperty("chunk-sending.cache-chunks", false);
$this->cacheChunks = (bool) $this->server->getProperty("chunk-sending.cache-chunks", true);
$dontTickBlocks = $this->server->getProperty("chunk-ticking.disable-block-ticking", []);
$this->randomTickBlocks = new \SplFixedArray(256);