From fdb3a5b121e8064f099ad1d48aa1c0e84103a2df Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 7 May 2023 18:29:37 +0100 Subject: [PATCH 01/14] Fixed incorrect implementation of peak timings --- src/timings/TimingsHandler.php | 2 +- src/timings/TimingsRecord.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/timings/TimingsHandler.php b/src/timings/TimingsHandler.php index 9a8234310..45ce022c9 100644 --- a/src/timings/TimingsHandler.php +++ b/src/timings/TimingsHandler.php @@ -32,7 +32,7 @@ use function implode; use function spl_object_id; class TimingsHandler{ - private const FORMAT_VERSION = 1; + private const FORMAT_VERSION = 2; //peak timings fix private static bool $enabled = false; private static int $timingStart = 0; diff --git a/src/timings/TimingsRecord.php b/src/timings/TimingsRecord.php index f09984b5b..2e4928d8a 100644 --- a/src/timings/TimingsRecord.php +++ b/src/timings/TimingsRecord.php @@ -66,9 +66,6 @@ final class TimingsRecord{ if($record->curTickTotal > Server::TARGET_NANOSECONDS_PER_TICK){ $record->violations += (int) floor($record->curTickTotal / Server::TARGET_NANOSECONDS_PER_TICK); } - if($record->curTickTotal > $record->peakTime){ - $record->peakTime = $record->curTickTotal; - } $record->curTickTotal = 0; $record->curCount = 0; $record->ticksActive++; @@ -126,7 +123,7 @@ final class TimingsRecord{ public function getTicksActive() : int{ return $this->ticksActive; } - public function getPeakTime() : float{ return $this->peakTime; } + public function getPeakTime() : int{ return $this->peakTime; } public function startTiming(int $now) : void{ $this->start = $now; @@ -152,6 +149,9 @@ final class TimingsRecord{ ++$this->curCount; ++$this->count; $this->start = 0; + if($diff > $this->peakTime){ + $this->peakTime = $diff; + } } public static function getCurrentRecord() : ?self{ From 077fac84bfebc35c0c8cf9d97ad9ae637f1eaca3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 8 May 2023 16:27:46 +0100 Subject: [PATCH 02/14] Added aggregate timers for all world timings this allows timings list view to display totals for these sections. It does make the tree view a bit more annoying in some cases though. --- src/timings/Timings.php | 22 +------------ src/world/World.php | 18 ++++++----- src/world/WorldManager.php | 3 -- src/world/WorldTimings.php | 63 ++++++++++++++++++++++++++------------ 4 files changed, 55 insertions(+), 51 deletions(-) diff --git a/src/timings/Timings.php b/src/timings/Timings.php index 74fa40dde..70a2a03cf 100644 --- a/src/timings/Timings.php +++ b/src/timings/Timings.php @@ -87,14 +87,6 @@ abstract class Timings{ /** @var TimingsHandler */ public static $serverCommand; /** @var TimingsHandler */ - public static $worldLoad; - /** @var TimingsHandler */ - public static $worldSave; - /** @var TimingsHandler */ - public static $population; - /** @var TimingsHandler */ - public static $generationCallback; - /** @var TimingsHandler */ public static $permissibleCalculation; /** @var TimingsHandler */ public static $permissibleCalculationDiff; @@ -111,10 +103,6 @@ abstract class Timings{ /** @var TimingsHandler */ public static $playerCheckNearEntities; - /** @var TimingsHandler */ - public static $tickEntity; - /** @var TimingsHandler */ - public static $tickTileEntity; /** @var TimingsHandler */ public static $entityBaseTick; @@ -203,10 +191,6 @@ abstract class Timings{ self::$playerChunkSend = new TimingsHandler("Player Network Send - Chunks", self::$playerNetworkSend, group: self::GROUP_BREAKDOWN); self::$scheduler = new TimingsHandler("Scheduler"); self::$serverCommand = new TimingsHandler("Server Command"); - self::$worldLoad = new TimingsHandler("World Load"); - self::$worldSave = new TimingsHandler("World Save"); - self::$population = new TimingsHandler("World Population"); - self::$generationCallback = new TimingsHandler("World Generation Callback"); self::$permissibleCalculation = new TimingsHandler("Permissible Calculation"); self::$permissibleCalculationDiff = new TimingsHandler("Permissible Calculation - Diff", self::$permissibleCalculation, group: self::GROUP_BREAKDOWN); self::$permissibleCalculationCallback = new TimingsHandler("Permissible Calculation - Callbacks", self::$permissibleCalculation, group: self::GROUP_BREAKDOWN); @@ -221,9 +205,6 @@ abstract class Timings{ self::$projectileMoveRayTrace = new TimingsHandler("Projectile Movement - Ray Tracing", self::$projectileMove, group: self::GROUP_BREAKDOWN); self::$playerCheckNearEntities = new TimingsHandler("checkNearEntities", group: self::GROUP_BREAKDOWN); - self::$tickEntity = new TimingsHandler("Entity Tick", group: self::GROUP_BREAKDOWN); - self::$tickTileEntity = new TimingsHandler("Block Entity Tick", group: self::GROUP_BREAKDOWN); - self::$entityBaseTick = new TimingsHandler("Entity Base Tick", group: self::GROUP_BREAKDOWN); self::$livingEntityBaseTick = new TimingsHandler("Entity Base Tick - Living", group: self::GROUP_BREAKDOWN); self::$itemEntityBaseTick = new TimingsHandler("Entity Base Tick - ItemEntity", group: self::GROUP_BREAKDOWN); @@ -272,7 +253,7 @@ abstract class Timings{ }else{ $displayName = self::shortenCoreClassName($entity::class, "pocketmine\\entity\\"); } - self::$entityTypeTimingMap[$entity::class] = new TimingsHandler("Entity Tick - " . $displayName, self::$tickEntity, group: self::GROUP_BREAKDOWN); + self::$entityTypeTimingMap[$entity::class] = new TimingsHandler("Entity Tick - " . $displayName, group: self::GROUP_BREAKDOWN); } return self::$entityTypeTimingMap[$entity::class]; @@ -282,7 +263,6 @@ abstract class Timings{ if(!isset(self::$tileEntityTypeTimingMap[$tile::class])){ self::$tileEntityTypeTimingMap[$tile::class] = new TimingsHandler( "Block Entity Tick - " . self::shortenCoreClassName($tile::class, "pocketmine\\block\\tile\\"), - self::$tickTileEntity, group: self::GROUP_BREAKDOWN ); } diff --git a/src/world/World.php b/src/world/World.php index 1803c03f1..ef62cb987 100644 --- a/src/world/World.php +++ b/src/world/World.php @@ -77,7 +77,6 @@ use pocketmine\promise\PromiseResolver; use pocketmine\scheduler\AsyncPool; use pocketmine\Server; use pocketmine\ServerConfigGroup; -use pocketmine\timings\Timings; use pocketmine\utils\AssumptionFailedError; use pocketmine\utils\Limits; use pocketmine\utils\ReversePriorityQueue; @@ -999,7 +998,6 @@ class World implements ChunkManager{ $this->timings->entityTick->startTiming(); //Update entities that need update - Timings::$tickEntity->startTiming(); foreach($this->updateEntities as $id => $entity){ if($entity->isClosed() || $entity->isFlaggedForDespawn() || !$entity->onUpdate($currentTick)){ unset($this->updateEntities[$id]); @@ -1008,7 +1006,6 @@ class World implements ChunkManager{ $entity->close(); } } - Timings::$tickEntity->stopTiming(); $this->timings->entityTick->stopTiming(); $this->timings->randomChunkUpdates->startTiming(); @@ -1439,10 +1436,15 @@ class World implements ChunkManager{ (new WorldSaveEvent($this))->call(); + $timings = $this->timings->syncDataSave; + $timings->startTiming(); + $this->provider->getWorldData()->setTime($this->time); $this->saveChunks(); $this->provider->getWorldData()->save(); + $timings->stopTiming(); + return true; } @@ -3248,7 +3250,8 @@ class World implements ChunkManager{ private function internalOrderChunkPopulation(int $chunkX, int $chunkZ, ?ChunkLoader $associatedChunkLoader, ?PromiseResolver $resolver) : Promise{ $chunkHash = World::chunkHash($chunkX, $chunkZ); - Timings::$population->startTiming(); + $timings = $this->timings->chunkPopulationOrder; + $timings->startTiming(); try{ for($xx = -1; $xx <= 1; ++$xx){ @@ -3305,7 +3308,7 @@ class World implements ChunkManager{ return $resolver->getPromise(); }finally{ - Timings::$population->stopTiming(); + $timings->stopTiming(); } } @@ -3314,7 +3317,8 @@ class World implements ChunkManager{ * @phpstan-param array $adjacentChunks */ private function generateChunkCallback(ChunkLockId $chunkLockId, int $x, int $z, Chunk $chunk, array $adjacentChunks, ChunkLoader $temporaryChunkLoader) : void{ - Timings::$generationCallback->startTiming(); + $timings = $this->timings->chunkPopulationCompletion; + $timings->startTiming(); $dirtyChunks = 0; for($xx = -1; $xx <= 1; ++$xx){ @@ -3383,7 +3387,7 @@ class World implements ChunkManager{ $this->drainPopulationRequestQueue(); } - Timings::$generationCallback->stopTiming(); + $timings->stopTiming(); } public function doChunkGarbageCollection() : void{ diff --git a/src/world/WorldManager.php b/src/world/WorldManager.php index 1124d513d..f056608d7 100644 --- a/src/world/WorldManager.php +++ b/src/world/WorldManager.php @@ -30,7 +30,6 @@ use pocketmine\event\world\WorldUnloadEvent; use pocketmine\lang\KnownTranslationFactory; use pocketmine\player\ChunkSelector; use pocketmine\Server; -use pocketmine\timings\Timings; use pocketmine\world\format\Chunk; use pocketmine\world\format\io\exception\CorruptedWorldException; use pocketmine\world\format\io\exception\UnsupportedWorldFormatException; @@ -391,7 +390,6 @@ class WorldManager{ } private function doAutoSave() : void{ - Timings::$worldSave->startTiming(); foreach($this->worlds as $world){ foreach($world->getPlayers() as $player){ if($player->spawned){ @@ -400,6 +398,5 @@ class WorldManager{ } $world->save(false); } - Timings::$worldSave->stopTiming(); } } diff --git a/src/world/WorldTimings.php b/src/world/WorldTimings.php index 5a51f920b..97ab70709 100644 --- a/src/world/WorldTimings.php +++ b/src/world/WorldTimings.php @@ -38,6 +38,7 @@ class WorldTimings{ public TimingsHandler $randomChunkUpdatesChunkSelection; public TimingsHandler $doChunkGC; public TimingsHandler $entityTick; + public TimingsHandler $tileTick; public TimingsHandler $doTick; public TimingsHandler $syncChunkSend; @@ -48,33 +49,55 @@ class WorldTimings{ public TimingsHandler $syncChunkLoadFixInvalidBlocks; public TimingsHandler $syncChunkLoadEntities; public TimingsHandler $syncChunkLoadTileEntities; + + public TimingsHandler $syncDataSave; public TimingsHandler $syncChunkSave; + public TimingsHandler $chunkPopulationOrder; + public TimingsHandler $chunkPopulationCompletion; + + /** + * @var TimingsHandler[] + * @phpstan-var array + */ + private static array $aggregators = []; + + private static function newTimer(string $worldName, string $timerName) : TimingsHandler{ + $aggregator = self::$aggregators[$timerName] ??= new TimingsHandler("Worlds - $timerName"); //displayed in Minecraft primary table + + //TODO: maybe a dedicated group per world would be better? + return new TimingsHandler("$worldName - $timerName", $aggregator, Timings::GROUP_BREAKDOWN); + } + public function __construct(World $world){ - $name = $world->getFolderName() . " - "; + $name = $world->getFolderName(); - $this->setBlock = new TimingsHandler($name . "setBlock", group: Timings::GROUP_BREAKDOWN); - $this->doBlockLightUpdates = new TimingsHandler($name . "Block Light Updates", group: Timings::GROUP_BREAKDOWN); - $this->doBlockSkyLightUpdates = new TimingsHandler($name . "Sky Light Updates", group: Timings::GROUP_BREAKDOWN); + $this->setBlock = self::newTimer($name, "Set Blocks"); + $this->doBlockLightUpdates = self::newTimer($name, "Block Light Updates"); + $this->doBlockSkyLightUpdates = self::newTimer($name, "Sky Light Updates"); - $this->doChunkUnload = new TimingsHandler($name . "Unload Chunks", group: Timings::GROUP_BREAKDOWN); - $this->scheduledBlockUpdates = new TimingsHandler($name . "Scheduled Block Updates", group: Timings::GROUP_BREAKDOWN); - $this->randomChunkUpdates = new TimingsHandler($name . "Random Chunk Updates", group: Timings::GROUP_BREAKDOWN); - $this->randomChunkUpdatesChunkSelection = new TimingsHandler($name . "Random Chunk Updates - Chunk Selection", group: Timings::GROUP_BREAKDOWN); - $this->doChunkGC = new TimingsHandler($name . "Garbage Collection", group: Timings::GROUP_BREAKDOWN); - $this->entityTick = new TimingsHandler($name . "Tick Entities", group: Timings::GROUP_BREAKDOWN); + $this->doChunkUnload = self::newTimer($name, "Unload Chunks"); + $this->scheduledBlockUpdates = self::newTimer($name, "Scheduled Block Updates"); + $this->randomChunkUpdates = self::newTimer($name, "Random Chunk Updates"); + $this->randomChunkUpdatesChunkSelection = self::newTimer($name, "Random Chunk Updates - Chunk Selection"); + $this->doChunkGC = self::newTimer($name, "Garbage Collection"); + $this->entityTick = self::newTimer($name, "Entity Tick"); + $this->tileTick = self::newTimer($name, "Block Entity Tick"); + $this->doTick = self::newTimer($name, "World Tick"); - Timings::init(); //make sure the timers we want are available - $this->syncChunkSend = new TimingsHandler($name . "Player Send Chunks", Timings::$playerChunkSend, group: Timings::GROUP_BREAKDOWN); - $this->syncChunkSendPrepare = new TimingsHandler($name . "Player Send Chunk Prepare", Timings::$playerChunkSend, group: Timings::GROUP_BREAKDOWN); + $this->syncChunkSend = self::newTimer($name, "Player Send Chunks"); + $this->syncChunkSendPrepare = self::newTimer($name, "Player Send Chunk Prepare"); - $this->syncChunkLoad = new TimingsHandler($name . "Chunk Load", Timings::$worldLoad, group: Timings::GROUP_BREAKDOWN); - $this->syncChunkLoadData = new TimingsHandler($name . "Chunk Load - Data", group: Timings::GROUP_BREAKDOWN); - $this->syncChunkLoadFixInvalidBlocks = new TimingsHandler($name . "Chunk Load - Fix Invalid Blocks", group: Timings::GROUP_BREAKDOWN); - $this->syncChunkLoadEntities = new TimingsHandler($name . "Chunk Load - Entities", group: Timings::GROUP_BREAKDOWN); - $this->syncChunkLoadTileEntities = new TimingsHandler($name . "Chunk Load - TileEntities", group: Timings::GROUP_BREAKDOWN); - $this->syncChunkSave = new TimingsHandler($name . "Chunk Save", Timings::$worldSave, group: Timings::GROUP_BREAKDOWN); + $this->syncChunkLoad = self::newTimer($name, "Chunk Load"); + $this->syncChunkLoadData = self::newTimer($name, "Chunk Load - Data"); + $this->syncChunkLoadFixInvalidBlocks = self::newTimer($name, "Chunk Load - Fix Invalid Blocks"); + $this->syncChunkLoadEntities = self::newTimer($name, "Chunk Load - Entities"); + $this->syncChunkLoadTileEntities = self::newTimer($name, "Chunk Load - Block Entities"); - $this->doTick = new TimingsHandler($name . "World Tick"); + $this->syncDataSave = self::newTimer($name, "Data Save"); + $this->syncChunkSave = self::newTimer($name, "Chunk Save"); + + $this->chunkPopulationOrder = self::newTimer($name, "Chunk Population - Order"); + $this->chunkPopulationCompletion = self::newTimer($name, "Chunk Population - Completion"); } } From d317347a9b4c50283ad0dafd55f82b35eade0538 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 8 May 2023 16:35:30 +0100 Subject: [PATCH 03/14] WorldTimings: remove TODO I tried this, and it didn't really provide any information that the tree table didn't already show. --- src/world/WorldTimings.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/world/WorldTimings.php b/src/world/WorldTimings.php index 97ab70709..5c1a56011 100644 --- a/src/world/WorldTimings.php +++ b/src/world/WorldTimings.php @@ -65,7 +65,6 @@ class WorldTimings{ private static function newTimer(string $worldName, string $timerName) : TimingsHandler{ $aggregator = self::$aggregators[$timerName] ??= new TimingsHandler("Worlds - $timerName"); //displayed in Minecraft primary table - //TODO: maybe a dedicated group per world would be better? return new TimingsHandler("$worldName - $timerName", $aggregator, Timings::GROUP_BREAKDOWN); } From 44bc4d8c7caa3e02f6c20c904851eaa68aa1e95b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 May 2023 15:02:59 +0100 Subject: [PATCH 04/14] Bump phpstan/phpstan from 1.10.14 to 1.10.15 (#5741) Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.14 to 1.10.15. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.10.14...1.10.15) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.json | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 7650b7f36..630b31c17 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "webmozart/path-util": "^2.3" }, "require-dev": { - "phpstan/phpstan": "1.10.14", + "phpstan/phpstan": "1.10.15", "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.2.0", "phpunit/phpunit": "^9.2" diff --git a/composer.lock b/composer.lock index bad0235cb..9db2f5519 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7ca2d4ed0987ac17cf615d67945f5687", + "content-hash": "a5ffe862f4e6376eaf78593a4bb8aeb6", "packages": [ { "name": "adhocore/json-comment", @@ -1883,16 +1883,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.14", + "version": "1.10.15", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d232901b09e67538e5c86a724be841bea5768a7c" + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d232901b09e67538e5c86a724be841bea5768a7c", - "reference": "d232901b09e67538e5c86a724be841bea5768a7c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd", + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd", "shasum": "" }, "require": { @@ -1941,7 +1941,7 @@ "type": "tidelift" } ], - "time": "2023-04-19T13:47:27+00:00" + "time": "2023-05-09T15:28:01+00:00" }, { "name": "phpstan/phpstan-phpunit", From 9d111e13f123b3fefe9fadd6d98c4bdd713bf979 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 15 May 2023 14:58:31 +0100 Subject: [PATCH 05/14] CONTRIBUTING: added table of in-house dependencies and which classes, functions or namespaces they contain --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45841fc15..0f3698d49 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,30 @@ Larger contributions like feature additions should be preceded by a [Change Prop ## Other things you'll need - [git](https://git-scm.com/) +## List of `pocketmine` namespaces which are in other repos +PocketMine-MP has several dependencies which are independent from the main server code. Most of them use the `pocketmine` namespace. +Some of these add extra classes to packages which already exist in PocketMine-MP. + +Take a look at the table below if you can't find the class or function you're looking for. + +| Source URL | Namespace, class or function | +|:----------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------| +| [pmmp/BedrockProtocol](https://github.com/pmmp/BedrockProtocol) | `pocketmine\network\mcpe\protocol` | +| [pmmp/BinaryUtils](https://github.com/pmmp/BinaryUtils) | `pocketmine\utils\BinaryDataException`
`pocketmine\utils\BinaryStream`
`pocketmine\utils\Binary` | +| [pmmp/ClassLoader](https://github.com/pmmp/`ClassLoader`) | `BaseClassLoader`
`ClassLoader`
`DynamicClassLoader` | +| [pmmp/Color](https://github.com/pmmp/Color) | `pocketmine\color` | +| [pmmp/ErrorHandler](https://github.com/pmmp/ErrorHandler) | `pocketmine\errorhandler` | +| [pmmp/LogPthreads](https://github.com/pmmp/LogPthreads) | `ThreadedLoggerAttachment`
`ThreadedLogger`
`AttachableThreadedLogger` | +| [pmmp/Log](https://github.com/pmmp/Log) | `AttachableLogger`
`BufferedLogger`
`GlobalLogger`
`LogLevel`
`Logger`
`PrefixedLogger`
`SimpleLogger` | +| [pmmp/Math](https://github.com/pmmp/Math) | `pocketmine\math` | +| [pmmp/NBT](https://github.com/pmmp/NBT) | `pocketmine\nbt` | +| [pmmp/RakLibIpc](https://github.com/pmmp/RakLibIpc) | `raklib\server\ipc` | +| [pmmp/RakLib](https://github.com/pmmp/RakLib) | `raklib` | +| [pmmp/Snooze](https://github.com/pmmp/Snooze) | `pocketmine\snooze` | +| [pmmp/ext-chunkutils2](https://github.com/pmmp/ext-chunkutils2) | `pocketmine\world\format\LightArray`
`pocketmine\world\format\PalettedBlockArray`
`pocketmine\world\format\io\SubChunkConverter` | +| [pmmp/ext-morton](https://github.com/pmmp/ext-morton) | `morton2d_decode`
`morton2d_encode`
`morton3d_decode`
`morton3d_encode` | +| [pmmp/ext-libdeflate](https://github.com/pmmp/ext-libdeflate) | `libdeflate_deflate_compress`
`libdeflate_gzip_compress`
`libdeflate_zlib_compress` | + ## Choosing a target branch PocketMine-MP has three primary branches of development. From a4fea1444a50f2382ba9b8643fb041db781036d0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 May 2023 14:21:32 +0100 Subject: [PATCH 06/14] Remove validateCallableSignature() calls from network hot paths we rely on phpstan for validation of this internally, and plugins shouldn't be calling these methods anyway. this significantly reduces the overhead of CompressBatchPromise. --- src/network/mcpe/NetworkSession.php | 2 -- src/network/mcpe/compression/CompressBatchPromise.php | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index 92a992ffb..dfb2e1aba 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -1000,8 +1000,6 @@ class NetworkSession{ * @phpstan-param \Closure() : void $onCompletion */ public function startUsingChunk(int $chunkX, int $chunkZ, \Closure $onCompletion) : void{ - Utils::validateCallableSignature(function() : void{}, $onCompletion); - $world = $this->player->getLocation()->getWorld(); ChunkCache::getInstance($world, $this->compressor)->request($chunkX, $chunkZ)->onResolve( diff --git a/src/network/mcpe/compression/CompressBatchPromise.php b/src/network/mcpe/compression/CompressBatchPromise.php index 3b8c9680b..6c8333db6 100644 --- a/src/network/mcpe/compression/CompressBatchPromise.php +++ b/src/network/mcpe/compression/CompressBatchPromise.php @@ -42,9 +42,6 @@ class CompressBatchPromise{ */ public function onResolve(\Closure ...$callbacks) : void{ $this->checkCancelled(); - foreach($callbacks as $callback){ - Utils::validateCallableSignature(function(CompressBatchPromise $promise) : void{}, $callback); - } if($this->result !== null){ foreach($callbacks as $callback){ $callback($this); From 9499e2e5955e92e486a603c00d1df170097e70a2 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 May 2023 14:21:59 +0100 Subject: [PATCH 07/14] always the CS... --- src/network/mcpe/NetworkSession.php | 1 - src/network/mcpe/compression/CompressBatchPromise.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index dfb2e1aba..d87c1b9a8 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -107,7 +107,6 @@ use pocketmine\utils\BinaryDataException; use pocketmine\utils\BinaryStream; use pocketmine\utils\ObjectSet; use pocketmine\utils\TextFormat; -use pocketmine\utils\Utils; use pocketmine\world\Position; use function array_map; use function array_values; diff --git a/src/network/mcpe/compression/CompressBatchPromise.php b/src/network/mcpe/compression/CompressBatchPromise.php index 6c8333db6..12ac35c60 100644 --- a/src/network/mcpe/compression/CompressBatchPromise.php +++ b/src/network/mcpe/compression/CompressBatchPromise.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace pocketmine\network\mcpe\compression; -use pocketmine\utils\Utils; use function array_push; class CompressBatchPromise{ From 599c4284f560ce09aac1cda996743daf9d543aff Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 May 2023 22:54:06 +0100 Subject: [PATCH 08/14] Introduce 10 KB threshold for async compression due to the extremely large performance cost of instantiating AsyncTasks, it's usually not worth bothering with async compression except for very large packets. While this large overhead can be significantly reduced by using specialized threads, it's early days in the testing stages for such improvements, and for now, we still have this to deal with. Since async compression is always used prior to player spawn, this change may slightly improve the performance of the pre-join stage of the game. --- resources/pocketmine.yml | 5 ++++- src/Server.php | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/pocketmine.yml b/resources/pocketmine.yml index ac60afe53..408b5b95b 100644 --- a/resources/pocketmine.yml +++ b/resources/pocketmine.yml @@ -85,8 +85,11 @@ network: batch-threshold: 256 #Compression level used when sending batched packets. Higher = more CPU, less bandwidth usage compression-level: 6 - #Use AsyncTasks for compression. Adds half/one tick delay, less CPU load on main thread + #Use AsyncTasks for compression during the main game session. Increases latency, but may reduce main thread load async-compression: false + #Threshold for async compression, in bytes. Only packets larger than this will be compressed asynchronously + #Due to large overhead of AsyncTask, async compression isn't worth it except for large packets + async-compression-threshold: 10000 #Experimental. Use UPnP to automatically port forward upnp-forwarding: false #Maximum size in bytes of packets sent over the network (default 1492 bytes). Packets larger than this will be diff --git a/src/Server.php b/src/Server.php index a81b1d74b..11a2b157a 100644 --- a/src/Server.php +++ b/src/Server.php @@ -208,6 +208,8 @@ class Server{ private const TICKS_PER_TPS_OVERLOAD_WARNING = 5 * self::TARGET_TICKS_PER_SECOND; private const TICKS_PER_STATS_REPORT = 300 * self::TARGET_TICKS_PER_SECOND; + private const DEFAULT_ASYNC_COMPRESSION_THRESHOLD = 10_000; + private static ?Server $instance = null; private TimeTrackingSleeperHandler $tickSleeper; @@ -266,6 +268,7 @@ class Server{ private Network $network; private bool $networkCompressionAsync = true; + private int $networkCompressionAsyncThreshold = self::DEFAULT_ASYNC_COMPRESSION_THRESHOLD; private Language $language; private bool $forceLanguage = false; @@ -908,6 +911,10 @@ class Server{ ZlibCompressor::setInstance(new ZlibCompressor($netCompressionLevel, $netCompressionThreshold, ZlibCompressor::DEFAULT_MAX_DECOMPRESSION_SIZE)); $this->networkCompressionAsync = $this->configGroup->getPropertyBool("network.async-compression", true); + $this->networkCompressionAsyncThreshold = max( + $this->configGroup->getPropertyInt("network.async-compression-threshold", self::DEFAULT_ASYNC_COMPRESSION_THRESHOLD), + $netCompressionThreshold ?? self::DEFAULT_ASYNC_COMPRESSION_THRESHOLD + ); EncryptionContext::$ENABLED = $this->configGroup->getPropertyBool("network.enable-encryption", true); @@ -1375,7 +1382,7 @@ class Server{ } $promise = new CompressBatchPromise(); - if(!$sync){ + if(!$sync && strlen($buffer) >= $this->networkCompressionAsyncThreshold){ $task = new CompressBatchTask($buffer, $promise, $compressor); $this->asyncPool->submitTask($task); }else{ From 008a022ec16e9d2f7986febcefab26a9b3f3ab51 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 May 2023 23:02:33 +0100 Subject: [PATCH 09/14] Players now have finite resources in spectator mode this seems like the logical solution for the block picking issues. --- src/player/Player.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/player/Player.php b/src/player/Player.php index 279dd1ebf..e8dae37f4 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -1191,7 +1191,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ * TODO: make this a dynamic ability instead of being hardcoded */ public function hasFiniteResources() : bool{ - return $this->gamemode->equals(GameMode::SURVIVAL()) || $this->gamemode->equals(GameMode::ADVENTURE()); + return !$this->gamemode->equals(GameMode::CREATIVE()); } public function isFireProof() : bool{ @@ -1657,7 +1657,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ $ev = new PlayerBlockPickEvent($this, $block, $item); $existingSlot = $this->inventory->first($item); - if($existingSlot === -1 && ($this->hasFiniteResources() || $this->isSpectator())){ + if($existingSlot === -1 && $this->hasFiniteResources()){ $ev->cancel(); } $ev->call(); From 5a0cde49cc80e395a85204f9e9a15dd1884acc1e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 16 May 2023 23:37:58 +0100 Subject: [PATCH 10/14] AsyncPool: do not double-check progress updates on finished tasks checkProgressUpdates is called directly before onCompletion, so we only need to call it again if the task isn't finished yet. --- src/scheduler/AsyncPool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/AsyncPool.php b/src/scheduler/AsyncPool.php index 9029eb593..99175651d 100644 --- a/src/scheduler/AsyncPool.php +++ b/src/scheduler/AsyncPool.php @@ -247,7 +247,6 @@ class AsyncPool{ while(!$queue->isEmpty()){ /** @var AsyncTask $task */ $task = $queue->bottom(); - $task->checkProgressUpdates(); if($task->isFinished()){ //make sure the task actually executed before trying to collect $queue->dequeue(); @@ -268,6 +267,7 @@ class AsyncPool{ $task->onCompletion(); } }else{ + $task->checkProgressUpdates(); $more = true; break; //current task is still running, skip to next worker } From 2e5b2eed6eee5885ff3259b40c294e9762e4ce18 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 17 May 2023 13:43:28 +0100 Subject: [PATCH 11/14] Update composer dependencies --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 9db2f5519..a0e4aa8e4 100644 --- a/composer.lock +++ b/composer.lock @@ -2364,16 +2364,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.7", + "version": "9.6.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2" + "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", - "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", + "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", "shasum": "" }, "require": { @@ -2447,7 +2447,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" }, "funding": [ { @@ -2463,7 +2463,7 @@ "type": "tidelift" } ], - "time": "2023-04-14T08:58:40+00:00" + "time": "2023-05-11T05:14:45+00:00" }, { "name": "sebastian/cli-parser", @@ -2765,16 +2765,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { @@ -2819,7 +2819,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -2827,7 +2827,7 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", From 043350753b9c93a6a7e508fbaec0744e5d2d4beb Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 17 May 2023 13:53:57 +0100 Subject: [PATCH 12/14] Drop PHP 8.0, 8.1 is now minimum version --- .github/workflows/main.yml | 10 +- .github/workflows/update-php-versions.php | 1 - BUILDING.md | 10 +- build/php | 2 +- composer.json | 4 +- composer.lock | 126 ++++------------------ src/PocketMine.php | 2 +- 7 files changed, 34 insertions(+), 121 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3a2b1640..da8468a81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: image: [ubuntu-20.04] - php: [8.0.28, 8.1.18, 8.2.5] + php: [8.1.19, 8.2.6] steps: - name: Build and prepare PHP cache @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [8.0.28, 8.1.18, 8.2.5] + php: [8.1.19, 8.2.6] steps: - uses: actions/checkout@v3 @@ -71,7 +71,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [8.0.28, 8.1.18, 8.2.5] + php: [8.1.19, 8.2.6] steps: - uses: actions/checkout@v3 @@ -110,7 +110,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [8.0.28, 8.1.18, 8.2.5] + php: [8.1.19, 8.2.6] steps: - uses: actions/checkout@v3 @@ -151,7 +151,7 @@ jobs: fail-fast: false matrix: image: [ubuntu-20.04] - php: [8.0.28, 8.1.18, 8.2.5] + php: [8.1.19, 8.2.6] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update-php-versions.php b/.github/workflows/update-php-versions.php index 92e79a6de..2455ba101 100644 --- a/.github/workflows/update-php-versions.php +++ b/.github/workflows/update-php-versions.php @@ -22,7 +22,6 @@ declare(strict_types=1); const VERSIONS = [ - "8.0", "8.1", "8.2" ]; diff --git a/BUILDING.md b/BUILDING.md index d6e97e05c..95197de6b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -2,13 +2,13 @@ ## Pre-requisites - A bash shell (git bash is sufficient for Windows) - [`git`](https://git-scm.com) available in your shell -- PHP 8.0 or newer available in your shell +- PHP 8.1 or newer available in your shell - [`composer`](https://getcomposer.org) available in your shell ## Custom PHP binaries Because PocketMine-MP requires several non-standard PHP extensions and configuration, PMMP provides scripts to build custom binaries for running PocketMine-MP, as well as prebuilt binaries. -- [Prebuilt binaries](https://jenkins.pmmp.io/job/PHP-8.0-Aggregate) +- [Prebuilt binaries](https://github.com/pmmp/PHP-Binaries/releases) - [Compile scripts](https://github.com/pmmp/php-build-scripts) are provided as a submodule in the path `build/php` If you use a custom binary, you'll need to replace `composer` usages in this guide with `path/to/your/php path/to/your/composer.phar`. @@ -29,11 +29,5 @@ Run `composer make-server` using your preferred PHP binary. It'll drop a `Pocket You can also use the `--out` option to change the output filename. -There is a bug in PHP that might cause an error which looks like this: -``` -Fatal error: Uncaught BadMethodCallException: unable to create temporary file in PocketMine-MP/build/server-phar.php:119 -``` -You can work around it by setting `ulimit -n` to some bigger number, e.g. `8192`, or by updating your PHP version to at least 8.0.3. - ## Running PocketMine-MP from source code Run `src/PocketMine.php` using your preferred PHP binary. diff --git a/build/php b/build/php index a3c40579a..07f3d90fa 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit a3c40579ad91246b07053fc2c8f085efd442943a +Subproject commit 07f3d90faa1edcbd9c5adc7d17a1bb64a06dc346 diff --git a/composer.json b/composer.json index 630b31c17..0c1470be3 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "https://pmmp.io", "license": "LGPL-3.0", "require": { - "php": "^8.0", + "php": "^8.1", "php-64bit": "*", "ext-chunkutils2": "^0.3.1", "ext-crypto": "^0.3.1", @@ -77,7 +77,7 @@ }, "config": { "platform": { - "php": "8.0.0" + "php": "8.1.0" }, "sort-packages": true }, diff --git a/composer.lock b/composer.lock index a0e4aa8e4..fa28f6b62 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a5ffe862f4e6376eaf78593a4bb8aeb6", + "content-hash": "ecb1e46a4410fdc7efb7e3dac60b5322", "packages": [ { "name": "adhocore/json-comment", @@ -903,21 +903,20 @@ }, { "name": "ramsey/collection", - "version": "1.3.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4" + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4", - "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "symfony/polyfill-php81": "^1.23" + "php": "^8.1" }, "require-dev": { "captainhook/plugin-composer": "^5.3", @@ -977,7 +976,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.3.0" + "source": "https://github.com/ramsey/collection/tree/2.0.0" }, "funding": [ { @@ -989,7 +988,7 @@ "type": "tidelift" } ], - "time": "2022-12-27T19:12:24+00:00" + "time": "2022-12-31T21:50:55+00:00" }, { "name": "ramsey/uuid", @@ -1395,85 +1394,6 @@ ], "time": "2022-11-03T14:55:06+00:00" }, - { - "name": "symfony/polyfill-php81", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, { "name": "webmozart/assert", "version": "1.11.0", @@ -1587,30 +1507,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -1637,7 +1557,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -1653,7 +1573,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "myclabs/deep-copy", @@ -3486,7 +3406,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.0", + "php": "^8.1", "php-64bit": "*", "ext-chunkutils2": "^0.3.1", "ext-crypto": "^0.3.1", @@ -3515,7 +3435,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "8.0.0" + "php": "8.1.0" }, "plugin-api-version": "2.3.0" } diff --git a/src/PocketMine.php b/src/PocketMine.php index 4b0b644ec..7b47449d5 100644 --- a/src/PocketMine.php +++ b/src/PocketMine.php @@ -50,7 +50,7 @@ namespace pocketmine { require_once __DIR__ . '/VersionInfo.php'; - const MIN_PHP_VERSION = "8.0.0"; + const MIN_PHP_VERSION = "8.1.0"; /** * @param string $message From c7dff9ea40519eb8c1f85e47ff2b6e710591fd6c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 17 May 2023 14:11:43 +0100 Subject: [PATCH 13/14] bootstrap: remove ext-parallel bootstrapping code I have no intention of using parallel, so this code is not necessary. --- src/PocketMine.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PocketMine.php b/src/PocketMine.php index 7b47449d5..c653d33ea 100644 --- a/src/PocketMine.php +++ b/src/PocketMine.php @@ -265,9 +265,6 @@ JIT_WARNING exit(1); } } - if(extension_loaded('parallel')){ - \parallel\bootstrap(\pocketmine\COMPOSER_AUTOLOADER_PATH); - } ErrorToExceptionHandler::set(); From 0547383296e17131c23b6a8a827e87a40fffc3d3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 17 May 2023 15:08:05 +0100 Subject: [PATCH 14/14] Update build/php submodule to pmmp/PHP-Binaries@f860ade30acc074a98bbf5ff286f35b5eda10c86 --- build/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php b/build/php index 07f3d90fa..f860ade30 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 07f3d90faa1edcbd9c5adc7d17a1bb64a06dc346 +Subproject commit f860ade30acc074a98bbf5ff286f35b5eda10c86