If you're writing a HUGE report, it might make more sense to write it to
disk as a .html file and redirect the user to that page. I would guess
that it would be as fast to do that.

On Tue, Jun 11, 2002 at 11:13:54AM -0400, Chen, Gin wrote:
> Hi all,
>
>         I have a HUGE report that is displayed using a Servlet.
> Unfortunately, the creation of it (tables and all) ends up chewing threw my
> memory. My question is.. is there a way in Servlets to reclaim part of that
> memory by sending partial streams thru to the client? In other words,
> suppose I format part1 (upper 1/3 for arguments sake) as a StringBuffer and
> then out.println it. Can I then clear the buffer to work on part2 and then
> repeat for part3? Does this help reclaim memory? Would using an out.flush at
> that point help?
>
>         I would expect that after doing an out.println.. that data is now
> stored away in the mechanisms of the println so that the original
> StringBuffer is no longer required. Does that make sense?
>
> -Tim
>
> ___________________________________________________________________________
> 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
>

--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.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