Skip to content

Instantly share code, notes, and snippets.

/map.cpp.diff Secret

Created August 15, 2015 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ef351c1b9d8222dead32 to your computer and use it in GitHub Desktop.
Save anonymous/ef351c1b9d8222dead32 to your computer and use it in GitHub Desktop.
loaded blocks benchmark
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1541,15 +1541,15 @@ void Map::timerUpdate(float dtime, float unload_timeout, u32 max_loaded_blocks,
// Finally delete the empty sectors
deleteSectors(sector_deletion_queue);
- if(deleted_blocks_count != 0)
+ //if(deleted_blocks_count != 0)
{
PrintInfo(infostream); // ServerMap/ClientMap:
- infostream<<"Unloaded "<<deleted_blocks_count
+ actionstream<<"Unloaded "<<deleted_blocks_count
<<" blocks from memory";
if(save_before_unloading)
- infostream<<", of which "<<saved_blocks_count<<" were written";
- infostream<<", "<<block_count_all<<" blocks in memory";
- infostream<<"."<<std::endl;
+ actionstream<<", of which "<<saved_blocks_count<<" were written";
+ actionstream<<", "<<block_count_all<<" blocks in memory";
+ actionstream<<"."<<std::endl;
if(saved_blocks_count != 0){
PrintInfo(infostream); // ServerMap/ClientMap:
infostream<<"Blocks modified by: "<<std::endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment