Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase speed #191

Open
stefanak-michal opened this issue Dec 8, 2020 · 0 comments
Open

Increase speed #191

stefanak-michal opened this issue Dec 8, 2020 · 0 comments

Comments

@stefanak-michal
Copy link

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, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant