[BUG] Hugely inefficient FTP code: coding opportunity

Henrik Gedenryd h.gedenryd at open.ac.uk
Mon Feb 11 11:38:53 UTC 2002


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.

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