[BUG] Hugely inefficient FTP code: coding opportunity
Felix Franz
fefr at gmx.net
Mon Feb 11 13:07:24 UTC 2002
Henrik Gedenryd wrote:
> I've now made remote up-and downloading of module work properly.
>
> 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.
>
> 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.
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 :-)
Cheers,
felix
>
> The other option is supporting HTTP PUT, Cees would be willing to make the
> server support this, but this may not be trivial. I am not planning to spend
> my time on this.
>
> Henrik
>
>
>
>
More information about the Squeak-dev
mailing list
|