mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock copying done in the main thread
Cache size is configurable by the meshgen_block_cache_size (default 20 MB). New profiler stats: - MeshUpdateQueue MapBlock cache hit % - MeshUpdateQueue MapBlock cache size kB Removes one type of stutter that was seen on the client when received MapBlocks were being handled. (the "MeshMakeData::fill" stutter) Kind of related to at least #5239 Originally preceded by these commits, now includes them: - Move the mesh generator thread into src/mesh_generator_thread.{cpp,h} - mesh_generator_thread.cpp: Update code style - MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits. - MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
This commit is contained in:
parent
4323ad163f
commit
04cc9de8f2
12 changed files with 526 additions and 278 deletions
|
@ -39,6 +39,7 @@ void set_default_settings(Settings *settings)
|
|||
settings->setDefault("sound_volume", "0.8");
|
||||
settings->setDefault("enable_mesh_cache", "false");
|
||||
settings->setDefault("mesh_generation_interval", "0");
|
||||
settings->setDefault("meshgen_block_cache_size", "20");
|
||||
settings->setDefault("enable_vbo", "true");
|
||||
settings->setDefault("free_move", "false");
|
||||
settings->setDefault("fast_move", "false");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue