title: the performance of php fread and echo is very bad
body: <p>I write a php script named 'download.php' to push files to client, </p>
  
  <pre><code>$fd = fopen($path, "rb");
  if ($fd === false) {
      echo "404 file not found";
      return false;
  } 
  
  Header("Content-type: image/png");
  
  while (!feof($fd))
  {
      $buf = fread($fd, 1024);
      if ($buf === false) {
          break;
      }
      echo $buf;
  }
  
  fclose($fd);
  </code></pre>
  
  <p>When I test on chrome to download a 4M image, it will consume 1.4s.
  the apache server is on my PC. if I put the image in www/ and download it directly, that only consume 44ms.</p>
  
  <p>I tried to increase the bufsize of fread, but it just improve performance a little.</p>