[Seaside-dev] Why does WABufferedResponse need a ReadWriteStream?

Paolo Bonzini paolo.bonzini at gmail.com
Tue Jan 27 07:09:45 UTC 2009


> The read write stream made things simpler in previous versions,
> because the server adaptor could just read from the previously written
> stream without converting it to a different object. As I said, this is
> probably not needed anymore and also not very nice, because it can be
> done on the fly and no second reading pass is necessary.

One alternative that I always liked a lot is to have a method
converting a WriteStream to a ReadStream (without additional copies of
the collection, so the memory cost is very low).  I added it to GNU
Smalltalk so that I could pass equally well a WriteStream or a String
to the compiler.  WAPlatform could add a #seasideReadStream method to
WriteStream.

Would this be feasible to implement in other dialects?  At worst you
can do #on:from:to: but that's often unoptimized and will do a copy
even when from=1.

Paolo


More information about the seaside-dev mailing list