[FIXed] Re: [BUG] Hugely inefficient FTP code: coding opportunity

Henrik Gedenryd h.gedenryd at open.ac.uk
Mon Apr 8 12:44:04 UTC 2002


Dan Ingalls wrote:

> I'd like to get it, use it, and put it out as an update.
> Slow FTP has been a problem for update management for ages.
> Basically, lots of stuff fails because the server gets bored,
> and you have to start over again.

It's out as 4776.

The clearest example of its use is probably in RemoteModuleStorageTests
>>verifyRepositoryContents  or ModuleInstaller>> uploadStandaloneRepositories.

What you do is to create a ServerDirectory instance, send #wakeup, hold on
to this instance, and all ftp commands invoked from this instance will share
the same session. You can even have several instances, pointing to
diffferent directories on the server, share the same session. Then send
#sleep to close the session.

Since I use Repository objects to wrap the ServerDirectory instances, and to
handle sharing the sessions between directories in a nice way, the uploading
code has an extra layer of indirection making it a little harder to see
what's going on (downloading uses http currently).

Henrik




More information about the Squeak-dev mailing list