mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
FormatConverter: do periodic GC
this reduces the risk of OOM during conversion of large worlds we probably ought to limit the size of region caches for regionized worlds, but that's a problem for another time.
This commit is contained in:
parent
ada3acdba4
commit
306623e890
@ -153,6 +153,9 @@ class FormatConverter{
|
||||
$this->logger->info("Converted $counter / $count chunks (" . floor($this->chunksPerProgressUpdate / $diff) . " chunks/sec)");
|
||||
flush();
|
||||
}
|
||||
if(($counter % (2 ** 16)) === 0){
|
||||
$new->doGarbageCollection();
|
||||
}
|
||||
}
|
||||
$total = microtime(true) - $start;
|
||||
$this->logger->info("Converted $counter / $counter chunks in " . round($total, 3) . " seconds (" . floor($counter / $total) . " chunks/sec)");
|
||||
|
Loading…
x
Reference in New Issue
Block a user