develooper Front page | perl.libnet | Postings from April 2002

[net-ftp-common] Net::FTP slow compared to spawning ftp process

Thread Next
From:
Terrence Brannon
Date:
April 18, 2002 20:17
Subject:
[net-ftp-common] Net::FTP slow compared to spawning ftp process
Message ID:
15551.35908.407278.515727@cae31-196-124.sc.rr.com
Hi Brian,

You might put this question on the perl-libnet@perl.org list as
Net::FTP is maintained by Graham Barr and you are raising an issue
specific to his module, not my application layer on top of it.

I am Cc'ing this message there

brian_turner_98006 writes:
 : When I do an ftp using:
 :         `ftp -i -n $dbshost << 'EOF'
 : user $remoteuser $remotepwd
 : get $remotefile $localfile
 : quit
 : EOF`;
 : 
 : It takes an average of about 0.024 seconds/request
 : 
 : However, when I try it with 
 : 
 :     $ftp = Net::FTP->new($dbshost,Debug => 0);
 :     $ftp->login($remoteuser,$remotepwd);
 : 
 : then loop with:
 : 
 : $ftp->get($remotefile, $localfile)
 : 
 : It takes about 1.3 seconds/request.
 : 
 : Version info:
 : 
 : Summary of my perl5 (revision 5.0 version 6 subversion 0) 
 : configuration:
 :   Platform:
 :     osname=solaris, osvers=2.6, archname=sun4-solaris
 :     uname='sunos rmdsun01 5.6 generic_105181-21 sun4u sparc 
 : sunw,ultra-4 '
 : 
 : I'm assuming that the login stays connected when I use Net::FTP so 
 : this doesn't make sense to me.  Spawning a process+connecting should 
 : be slower.  Any suggestions?
 : 
 : FWIW, my application requires a large number of small file transfers 
 : at random intervals.
 : 
 : (I didn't see that Net::FTP was modifed in 5.6.1 based on 
 : http://www.perldoc.com/perl5.6.1/Changes.html, but I'm open to 
 : upgrading if there's a reasonable chance of fixing this issue)
 : 
 : Thanks,
 : 
 : Brian
 : 
 : 
 : 
 : 
 : 
 : ------------------------ Yahoo! Groups Sponsor ---------------------~-->
 : Buy Stock for $4
 : and no minimums.
 : FREE Money 2002.
 : http://us.click.yahoo.com/k6cvND/n97DAA/ySSFAA/ndFolB/TM
 : ---------------------------------------------------------------------~->
 : 
 : To unsubscribe from this group, send an email to:
 : net-ftp-common-unsubscribe@yahoogroups.com
 : 
 :  
 : 
 : Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
 : 
 : 
 : 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About