mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Added timings to chunk sending
This commit is contained in:
parent
7b699d9afd
commit
20842636f9
@ -2014,6 +2014,8 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
public function chunkRequestCallback($x, $z, $payload){
|
||||
$this->timings->syncChunkSendTimer->startTiming();
|
||||
|
||||
$index = Level::chunkHash($x, $z);
|
||||
|
||||
if(!isset($this->chunkCache[$index]) and $this->cacheChunks and $this->server->getMemoryManager()->canUseChunkCache()){
|
||||
@ -2030,6 +2032,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
unset($this->chunkSendQueue[$index]);
|
||||
unset($this->chunkSendTasks[$index]);
|
||||
}
|
||||
$this->timings->syncChunkSendTimer->stopTiming();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user