[ENH] 2x faster SocketStream uploads

Michal miso.fastlist at auf.net
Mon Apr 12 01:44:21 UTC 2004


The attached changeset optimises SocketStream #upToAll: (i) use a
WriteStream for the searchBuffer rather than copying the incoming
portions over and over again, (ii) when searching the buffer for the
boundary, do not copy it, use its raw contents with #originalContents
(this entails that the blank space at the end of the buffer will also
be searched while searching for the boundary. This is semantically
harmless since spaces cannot be part of the boundary); (iii) also
search for the boundary delimiter only in the last two chunks rather
than searching in the whole file over and over again. 

Can make uploads of large files around 2x faster.

Michal



More information about the Squeak-dev mailing list