diff --git a/src/Settings/Ipc.php b/src/Settings/Ipc.php index e7143bbb2..f3a280a0e 100644 --- a/src/Settings/Ipc.php +++ b/src/Settings/Ipc.php @@ -34,6 +34,6 @@ final class Ipc extends SettingsAbstract */ public function getSlow(): bool { - return Magic::$isIpcWorker; + return Magic::$isIpcWorker || \PHP_OS_FAMILY === 'Windows'; } } diff --git a/src/polyfill.php b/src/polyfill.php index d75ac6af6..262e4b39f 100644 --- a/src/polyfill.php +++ b/src/polyfill.php @@ -6,6 +6,10 @@ if (class_exists('\\danog\\MadelineProto\\Db\\NullCache\\MysqlArray')) { return; } +if (\PHP_OS_FAMILY === 'Windows') { + echo "WARNING: MadelineProto runs around 10x slower on windows due to OS and PHP limitations. Make sure to deploy MadelineProto in production only on Linux or Mac OS machines for maximum performance.".PHP_EOL; +} + use danog\AsyncOrm\Internal\Containers\CacheContainer; use danog\AsyncOrm\Internal\Driver\MysqlArray; use danog\AsyncOrm\Internal\Driver\PostgresArray;