[BUG] Hugely inefficient FTP code: coding opportunity

Dan Ingalls Dan at SqueakLand.org
Mon Feb 11 15:52:47 UTC 2002


>>However, Squeak's underlying FTP code is so painfully inefficient that I
>>recommend that you avoid using it, and instead keep the
>>accessRemoteRepostories preference off, and upload from the local repository
>>cache using some other ftp program.
>>
>>An upload that takes say 5-15 seconds with another FTP program takes some *5
>>minutes* with Squeak according to the file time stamps.

Yes.  This is a constant problem to me when issuing updates.  If the server is at all busy, I get timed out and have to start all over again.

>>I've made downloads avoid this by using HTTP access.
>>
>>The problem is that Squeak's ftp code logs in and logs out between *every*
>>CWD, load, store, etc. -- every single server action.
>>
>>It is this same deficiency that makes project loading so slow: 0.25 seconds
>>to load an image segment from disk *really quickly*, but eons spent on
>>redundantly logging in and out of the ftp server.
>>
>>It wouldn't be too hard to change the code to allow multiple commands within
>>a single session: Put a socket instvar in ServerDirectory, and make the code
>>either login and logout if that socket instvar is nil, or if not, just use
>>it to send the command without logging in and out. Then wrap sessions in a
>>login and ensured logout.

It would be great if someone who understands this would fix it.  It would help us all around.

>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:
>
>"socket _ so".	"If user wants to keep connnection open, he must store socket"
>^so
>
>After enabling the line, two putFile:named: messages share the same socket.
>
>Highly confused :-)

I'll check with Ted.  he understood it all at one point.

	- Dan



More information about the Squeak-dev mailing list