Very slow on api send

I Use rocket in docker on Ubuntu
When using API to send messages to chat - it very slow

$time_start = microtime(true);

    $api = new \RocketChat\Client();
    $admin = new \RocketChat\User('informer', 'informer');
    if ($admin->login()) {

        $channel = new \RocketChat\Channel('testme', array($admin));
        for ($i = 0; $i <= 10; $i++) {
            $channel->postMessage("Hello [$i]");
        }
    }


    $time_end = microtime(true);

    $execution_time = ($time_end - $time_start);

    echo '<b>Total Execution Time:</b> ' . $execution_time . ' seconds'.PHP_EOL;

10 messages - 12 seconds

Server Setup Information

  • Version of Rocket.Chat Server:
  • Operating System: Ubuntu 18.04
  • Deployment Method: docker
  • Number of Running Instances: 1
  • Proxy: nginx