Hi,
thanks a lot for the replies. I will take a look at the links to the new
version of uploader code.
>From: Randy Layman <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: RE: Slow upload speeds
>Date: Fri, 5 Jan 2001 08:20:44 -0500
>
>
> The problem is still (probably, I haven't seen Jason's code),
>fundamentally the number of underlying system calls. This would be true if
>you wrote the program in Java or C or Visual Basic or Perl, Unix or NT.
>The
>User process has to ask the Operating System for the bytes. If it asks for
>each byte one at a time then it takes a lot more time than if it asked for
>(relatively) big blocks.
Yes, Jason's code was calling readLine on ServletInputStream, so my original
strategy was naturally to use in.read(buf, off, len) instead. I tried it,
and it did not show any improvement. Call to "read" was still taking 99% of
the method execution time. So I suspect this is the underlying stream
implementation that is not buffered and still reads 1 byte at at a time
from the socket.
>
> If you could give me a pointer to the source I could probably find a
>little time today to look over this and see how his code works and if this
>is really the problem.
Thanks a lot. I'll clean up the code to remove dependancies (it is a part of
a much bigger project) and send you the link.
>(Its possible that he knew about this problem and
>accounted for it, but its a very commonly overlooked issue).
>
> Randy
>
Andrus
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]