Skip to content

Increase speed #191

@stefanak-michal

Description

@stefanak-michal

Hi.

I've two suggestion to improve speed of curl connection.

  1. Class Transport constructor should call gethostbyname() if the host isn't IP. It will resolve hostname to IP and it's faster if you avoid DNS resolve every time.
$this->host = filter_var($ip, FILTER_VALIDATE_IP) ? $host : gethostbyname($host);
  1. Enable gzip on cURL curl_setopt($c, CURLOPT_ENCODING, '')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions