pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.26k stars 1.54k forks source link

LevelDB performance optimizations #2925

Open dktapps opened 5 years ago

dktapps commented 5 years ago

We've currently barely scratched the surface of performance improvements that can be made to world I/O with LevelDB.

LevelDB is extremely nice (much nicer than Anvil) because it allows reading/writing parts of chunks on disk without accessing the entire thing. This is hugely beneficial because:

The bottom line here is that because of the modularity of LevelDB chunks, it's possible to get substantial I/O performance improvements simply by being more selective about the data we read and write.

dktapps commented 3 years ago

Since this was written, chunk saving has been split into 3 parts:

1) Terrain is now only written if modified. 2) Biomes are only written if modified. (This will become significantly more important in 1.18 when 3D biomes arrive.) 3) Entities and tiles are always written.

Each of these steps happens independently.

Implementing terrain writing on a per-subchunk basis might be quite a bit more complicated, though.