commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Schoonveld <pschoonv...@yahoo.com>
Subject Re: [PATCH] performance problem w/ FTPClient
Date Sun, 16 Mar 2003 00:41:23 GMT
Daniel:

The big reason for me to use ASCII mode versus binary
is EBCDIC. I need to transfer largish files (11-30mb)
from an workstation for processing on a mainframe box.
if I were to transfer them in ASCII mode, they
wouldn't be automagically converted and the mainframe
would throw a fit.

I, personally, think that that filtering is something
that should be able to be shut off.  But, most of the
issue could be sorted by changed the I/O segment of
the code.

Thanks,
Patrick



--- "Daniel F. Savarese" <dfs@savarese.org> wrote:
> 
> I forgot to add that my comment doesn't mean that
> the ASCII transfers
> couldn't be optimized.  It's probably better to read
> the file in big
> chunks, scan the chunks and translate to another
> buffer (twice the
> size to handle the degenerate case of every
> character being a line
> feed), and write that buffer. 
> ToNetASCIIOutputStream calls write(int ch)
> from write(byte[]), which is bad if the underlying
> output stream isn't
> buffered.  Although ToNetASCIIOutputStream could be
> improved, the real
> culprit is FTPClient.__storeFileStream(), which does
> the following
>         if (__fileType == ASCII_FILE_TYPE)
>             output = new
> ToNetASCIIOutputStream(output);
> instead of
>         if (__fileType == ASCII_FILE_TYPE)
>             output = new ToNetASCIIOutputStream(new
> BufferedOutputStream(output));
> FTPClient.__storeFile() doesn't make that mistake. 
> I'll make the change in
> __storeFileStream(), but some performance testing
> would be necessary to arrive
> at appropriate buffer sizes.
> 
> daniel
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> 


=====
----------------------------------------------------------
PGP Public Key available: http://schoonveld.org/pgp/pschoonveld.pub.txt
----------------------------------------------------------

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message