Anton Tagunov wrote:
>
> out.write("<html>");
> generally results in the string being sent right to the user via
> the underlying socket implementation without any memory allocation.
>

 Premature optimization is the root of all evil :-)

 Most servlet containers buffer by default, see the apidocs
for javax.servlet.Response, specifically setBufferSize(). So
the String will not generally be sent directly to the
underlying socket implementation.

 In any case, if you're concerned with performance, you want
to avoid calls write() (the Java IO code is notoriously slow),
and the best way to do that is with big buffers.

 Making the code awkward in order to save a few bytes of
memory is something that you should only do if you're
really desperate.


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to