From: Perttu Ahola Date: Mon, 21 Nov 2011 11:35:32 +0000 (+0200) Subject: Don't print all block saves to verbosestream; rather print counts of distinct modifiers X-Git-Tag: 0.4.dev-20111201-0~110 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=616bad96afd9c4f507d7c94e13dbd09f54913a69;p=oweals%2Fminetest.git Don't print all block saves to verbosestream; rather print counts of distinct modifiers --- diff --git a/src/map.cpp b/src/map.cpp index 1e7abc57f..4db5a3d1a 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1391,6 +1391,9 @@ void Map::timerUpdate(float dtime, float unload_timeout, { bool save_before_unloading = (mapType() == MAPTYPE_SERVER); + // Profile modified reasons + Profiler modprofiler; + core::list sector_deletion_queue; u32 deleted_blocks_count = 0; u32 saved_blocks_count = 0; @@ -1423,9 +1426,7 @@ void Map::timerUpdate(float dtime, float unload_timeout, if(block->getModified() != MOD_STATE_CLEAN && save_before_unloading) { - verbosestream<<"Saving block before unloading, " - <<"modified by: " - <getModifiedReason()<getModifiedReason(), 1); saveBlock(block); saved_blocks_count++; } @@ -1462,6 +1463,9 @@ void Map::timerUpdate(float dtime, float unload_timeout, if(save_before_unloading) infostream<<", of which "<getModified() >= MOD_STATE_WRITE_NEEDED || only_changed == false) { - verbosestream<<"Saving block because of MOD_STATE_WRITE_NEEDED, " - <<"modified by: " - <getModifiedReason()<getModifiedReason(), 1); saveBlock(block); block_count++; @@ -2881,6 +2886,9 @@ void ServerMap::save(bool only_changed) <