title: Guzzle slow on laravel forge and homestead
body: <p>I don't understand why guzzle requests are really slow on laravel forge and laravel homestead. I did not change default server configuration on forge and homestead.</p>
  
  <p>Every simple request like this one ...</p>
  
  <pre><code>$client = new GuzzleHttp\Client();
  $response = $client-&gt;get('path-to-my-api');
  </code></pre>
  
  <p>... takes about 150ms (on homestead and forge). This appends on every request (same network or internet). I read some posts about guzzle and it seems to be very fast for every users, but not for me.</p>
  
  <p>Versions :</p>
  
  <ul>
  <li>curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3</li>
  <li>PHP Version 5.6.0</li>
  <li>Guzzle 5.1.0</li>
  </ul>
  
  <p>Something really weird is that when I do this (asynchronous) ...</p>
  
  <pre><code>$req = $client-&gt;createRequest('GET', 'path-to-my-api', ['future' =&gt; true]);
  
  $client-&gt;send($req)-&gt;then(function ($response) {
  });
  </code></pre>
  
  <p>... it takes about 10ms. It's great but I dont understand why. And I don't want to perform asynchronous requests.</p>
  
  <p>Maybe my time measure is buggy, but I think it's Ok : I use PHP debug bar like this :</p>
  
  <pre><code>// .....
  
  // synch
  Debugbar::startMeasure('synch','SYNCH Request');
  $response = $client-&gt;get('path-to-my-api');
  Debugbar::stopMeasure('synch');
  
  // asynch
  Debugbar::startMeasure('asynch','ASYNCH Request');
  $req = $client-&gt;createRequest('GET', 'path-to-my-api', ['future' =&gt; true]);
  
  $client-&gt;send($req)-&gt;then(function ($response) {
      Debugbar::stopMeasure('asynch');
  });
  </code></pre>
  
  <p>I know it's not easy to answer this question (because it's vague), but I have no clue for now :(. I can edit it if you want. Thanks a lot.</p>