Commit Graph

2 Commits

Author SHA1 Message Date
Jason Penilla a8ef7aa56f Prepare for updating server patches 2021-11-30 19:26:33 +01:00
PaulBGD 06d82e0d6d
Cache palette array (#6767)
Instead of allocating the 4KB for every chunk section, cache it locally and
reuse it for other chunk sections to save on allocations. These allocations add
up very quickly when saving chunks frequently.

For example, with 30,000 chunks and 16 chunk sections per chunk (which will
actually get larger in 1.18) it allocates nearly 2GB, which this patch
eliminates entirely.
2021-11-05 15:52:32 +01:00