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

Paolo Bonzini bonzini at gnu.org
Tue Jan 27 09:34:21 UTC 2009


Lukas Renggli wrote:
>>>> 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.
>>> I guess that should be easy. In the worst case you can always
>>> implement it using "contents readStream".
>> Yes, though that introduces the additional copy.  Eliminating copies and
>> object allocations is the key to efficient performance with Streams.
> 
> Exactly, that's what I am trying to peruse. If we encode on the fly we
> don't need to copy and encode the response to another stream after the
> request has been processes. Streaming servers might even directly
> write onto the socket, without the need for duplicated behavior that
> we have now.

Ok, so you want to use a decorator.  That makes sense.

Paolo


More information about the seaside-dev mailing list