mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Instrument touchMapBlocks and block loading/deserialization. (#13314)
This commit is contained in:
parent
f1feeb319c
commit
8f25f487fe
2 changed files with 6 additions and 0 deletions
|
@ -1803,8 +1803,11 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
|
|||
block = block_created_new.get();
|
||||
}
|
||||
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "ServerMap: deSer block", SPT_AVG);
|
||||
// Read basic data
|
||||
block->deSerialize(is, version, true);
|
||||
}
|
||||
|
||||
// If it's a new block, insert it to the map
|
||||
if (block_created_new) {
|
||||
|
@ -1845,6 +1848,7 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
|
|||
|
||||
MapBlock* ServerMap::loadBlock(v3s16 blockpos)
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "ServerMap: load block", SPT_AVG);
|
||||
bool created_new = (getBlockNoCreateNoEx(blockpos) == NULL);
|
||||
|
||||
v2s16 p2d(blockpos.X, blockpos.Z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue