title: Recursive ftp sync using perl Net::FTP is painfully slow
body: <p>I've written something rather simple to sync my files via ftp in perl</p>
  
  <pre><code>sub ftp_update {
      print "Checkin\' $_[0] \n";
      $ftp-&gt;cwd($_[0]);
      chdir $_[0];
      my @ls = $ftp-&gt;ls;
  
      foreach (@ls) {         
          ftp_update($_) if $ftp-&gt;isdir($_);
  
          next unless (! -e $_);
  
          if ($ftp-&gt;isfile($_)) {
              print "Gettin\' $_\n";
              $ftp-&gt;get($_);
          }               
      }
      $ftp-&gt;cdup;
      chdir "..";
  }
  </code></pre>
  
  <p>It works all right but it is painfully slow compared to FileZilla. Even when everything is up to date, i.e. no actual file transfer occurs it is still much, much slower than FileZilla.</p>
  
  <p>Any suggestions ?</p>