Comment 8 for bug 409615

Revision history for this message
Martin Pool (mbp) wrote :

Definitely getting warm.

However, this specific patch will make things slower than they need to be, because _fallback_append reads the whole file and then writes it back with the data appended. This could be awfully slow.

The smaller correct patch along these lines would be to update the code around line 426 that falls back to doing this, so that it also detects the response sent by your server.

A much better approach and eventually much faster would be to override open_write_stream for the FTPTransport class, so that it returns an object that when started opens a stream, then it sends each block across the connection as it is written in. You can base this on the code in put_file - in fact put_file could eventually be rewritten to stand on top of this.

That would be a big improvement for ftp users. I'm happy to look at an updated patch or to talk to you on irc.