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

Dan Ingalls Dan at SqueakLand.org
Fri Apr 5 18:45:44 UTC 2002

Henrik (or anyone else...)

Did this fix ever go out?  I can't find a ChangeSet.

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.

	- Dan
> >> ServerDirectory already has a instance variable "socket". I briefly looked at
> >> the code ... and I have to admit: I don't quite understand it.
>>> In ServerDirectory>>openNoDataFTP the storing of the socket is commented out.
>>> The last lines are:
>Umm, now that I looked *much* closer, there indeed some kind of support for
>But there isn't any protocol for it, no one is using it, and it's not
>obvious from the code... There is *plenty* of room for refactoring code
>there. I think the same "QUIT" code alone is in some 10 different places.
>I got it working. Woohoo! V e r y much faster! Now if only our proxy
>wouldn't return the wrong replies after an update...
>I'll include some kind of rudimentary protocol for this with the imminent
>change set. It will go something like this:
>    openSessions _ repositories collect: [:rep |
>        rep directory wakeUp; yourself].
>    [
>    <do your thing>
>    ] ensure: [openSessions do: [:serverDir | serverDir sleep]].
>I'm actually using the same session for multiple ServerDirectory instances
>on the same server.
>Thanks to Felix for this discovery! I had been looking at that code many
>times without discovering this little gem.

More information about the Squeak-dev mailing list