[Seaside] Re: [BUG][FIX] SocketStream, MultipartChunk, WAKom uploading slowness

Michael Rueger michael at squeakland.org
Thu Apr 1 19:40:40 CEST 2004


Michal wrote:

Good catch.

>    "This method is really dumb, it reads the entire body of the
>    chunk before writing it onto outStream. "
> 
> It turns out however that while that comment is true, the real
> offender is #upToAll: which incrementally copies the incoming file
> dozens of times over with:
> 
> searchBuffer := searchBuffer , self inStream upToEnd

Well, that's what you get when you abuse methods ;-)
The upToAll: was really ment to be used for parsing of short units like 
lines or headers.

While I agree, that it can't hurt to make this faster, it should still 
be the upstream handler doing the optimization knowing it deals with 
large files. It was always a problem in the current http code that stuff 
got loaded into memory first.


> (I still don't know why the upload originally hanged rather than
> timing out or reporting some error)

probably because the connection was still alive, though not doing 
anything for extended periods.

Michael




More information about the Seaside mailing list