Improved cache pool cleanup times

This commit is contained in:
Shoghi Cervantes 2014-10-29 16:13:47 +01:00
parent 8a768cea33
commit 00b282d40c

View File

@ -2163,12 +2163,15 @@ class Server{
Vector3::clearVectorList();
Position::clearPositionList();
if(($this->tickCounter % 20) === 0){
if(($this->tickCounter % 4) === 0){
Event::clearAllPools();
foreach($this->levels as $level){
$level->clearCache();
if(($this->tickCounter % 80) === 0){
foreach($this->levels as $level){
$level->clearCache();
}
AxisAlignedBB::clearBoundingBoxPool();
}
AxisAlignedBB::clearBoundingBoxPool();
}
Timings::$serverTickTimer->stopTiming();