[Seaside-dev] Issue 293 in seaside: Refactor WAResponse and
subclasses to
encapsulate stream and use WriteStream instead of ReadWriteStream
codesite-noreply at google.com
codesite-noreply at google.com
Thu Jan 22 07:35:33 UTC 2009
Updates:
Status: Accepted
Comment #2 on issue 293 by renggli: Refactor WAResponse and subclasses to
encapsulate stream and use WriteStream instead of ReadWriteStream
http://code.google.com/p/seaside/issues/detail?id=293
- How did you do it before, because "WAPlatform current readWriteStream" is
part of the platform support.
Furthermore ReadWriteStream IS PART of the ANSI standard (5.9.7, Page 285).
- The change regarding to WABufferedResponse>>#writeHeadersOn: Your change
makes the code very
inefficient, because it creates a copy of the complete response body just
to determine the size of the
contents. Wouldn't it be more reasonable if you implemented #size in Stream?
- The same for "nextPut: Character cr; nextPut: Character lf". They are
measurably slow, especially on Squeak
when called often. I suggest that we replace occurrences everywhere by
calling #cr (part of ANSI) and #lf
(would be an ANSI extension).
- The #stream accessor is an integral part of the WAStreamedResponse. It
cannot be removed. It is used to
retrieve the body-stream and flush the header fields to the socket.
Furthermore this accessor is used to
create the document where the components are being rendered upon.
- In the WAResponse #nextPutAll: implementations you call #asString. This
is a non portable method. We
should use #seasideString in such cases, but I wonder why this is needed
anyway? It is a potential
performance and memory leak. The stream is supposed to be a character
stream and in low level code like this
we don't want to do unnecessary copie.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the seaside-dev
mailing list