comp500 / tinymap

A lightweight server-side stateless web map
MIT License
28 stars 6 forks source link

Generate larger tile sizes, for better performance #14

Open comp500 opened 3 years ago

comp500 commented 3 years ago

Currently only 1-block-per-pixel (256x256) tiles are generated, which is very inefficient at lower zoom levels. Caching may be required to make this efficient, since every block read to a chunk still has to load the chunk (i.e. read the file, deflate the chunk data, decode the NBT data, read the blockstate value, look it up in the palette) - and when rendering more than one zoom level, these reads will be redundant if they are not cached.

I think it is still worth making the tile generation fast enough to not require caching, but caching will be useful (especially on overburdened or popular servers) to improve server-side performance.