Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : Re: FTP upload stalling
| Subject: | Re: FTP upload stalling |
| Posted by: | "Barry" (barry_morris@nospam.btinternet.com) |
| Date: | Fri, 19 Oct 2007 19:44:38 |
Hi Gambit
Thanks for the Post_Message / TIdNotify tip, I will implement this.
I downloaded the snapshot 3 days ago, the date I gave was the actual date
modified date of the idFTP.pas file and not the snapshot, however, I may
have downloaded an old snapshot? How do I know what version I have vs.
current snapshot version?
There does seem to be a problem in Vista, since the post I ran some more
tests from Vista Pro and although it is early days I have noticed the stall
problem only may only be happening when passive mode is NOT set. Here are
some stats for 26 files of 119MB :
Windows XP 45 minutes (passive off)
Windows Vista Pro 90 minutes (passive off - a lot of stall messages caused
by OnWork event not been raised)
Windows Vista Pro 52 minutes (passive on)
Does that make sense?
Regards
Barry
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4718e7bd$3@newsgroups.borland.com...
>
> "Barry" <barry_morris@nospam.btinternet.com> wrote in message
> news:4718a3cc@newsgroups.borland.com...
>
>> I have used Indy10 in a project and have had reports that
>> FTP upload is running slow and tests show that for no
>> apparent reason FTP can stall for several seconds before
>> resuming.
>
> FTP uses multiple socket connections. Each upload/download runs on its
> own dedicated connection. The delay could simply be how long it takes the
> OS to establish that connection each time.
>
>> I run FTP in its own thread with the main thread monitoring
>> progress via a timer event. I use the IDFTP OnWork event to
>> detect that something is actually happening and to provide
>> data to the main thread for progress bars etc. using the
>> Thread Synchronize method.
>
> That in itself is going to significantly slow down your transfers, as you
> are switching back to the main thread between each block of data that is
> transmitted. I would not suggest using Synchronize() in this situation at
> all. Use PostMessage(), PostThreadMessage(), or TIdNotify instead. Any
> of those can be used to send asynchronous updates to the main thread,
> allowing the transfer to continue forward without being blocked at all.
>
>> I am using Indy 10 snapshot where idFTP.pas is dated 5 March 2007.
>
> Have you tried upgrading to a newer snapshot since that date? You are
> using a version that is 7 months old.
>
>
> Gambit