title: Ways to speed op phpseclib sftp get to download remote file
body: <p>So I use phpseclib which downloads a 50MB file over sftp in roughly 45 seconds. Which is fast compared to ssh2_scp_recv() which takes 90+ seconds, but slow compared to my sftp client (filezilla), which takes 10 seconds max.</p>
  
  <p>My question is, what can I do to speed up file downloads through sftp, other than enabling the mcrypt, gmp and bcmath extensions which I've done already?</p>
  
  <p>I'm running PHP 5.5 on Windows 7, and got the same results when using either cli or browser/apache, and using sftp->get to download a file as a whole, or download a file in chunks of various sizes.</p>
  
  <p>Source:</p>
  
  <pre><code>set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
  require 'phpseclib/Net/SFTP.php';
  
  $sftp = new Net_SFTP($host, $port, $timeout);
  $sftp-&gt;login($user, $password);
  
  $sftp-&gt;get($remoteFile, $localFile);
  </code></pre>