wood burning stoves*
The moose likes Servlets and the fly likes How to determine correct buffer size? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to determine correct buffer size?" Watch "How to determine correct buffer size?" New topic
Author

How to determine correct buffer size?

Trevor Price
Greenhorn

Joined: May 19, 2006
Posts: 16
I've been adjusting the response buffer with setBufferSize(), but I'm wondering if someone can let me know what a good size is? Is it an art form or is there a science to it, or somewhere in between?

My scenario is as follows:

Due to certain legacy code and other issues in this servlet, I must output thousands of lines JavaScript. That means lots of . In fact, the final output approaches 1 meg in some cases. This is mostly an intranet application, so download/upload speeds should be fairly decent. However, some people will be accessing it from an external broadband connection.

Is setBufferSize(100000) too high? What kinds of things do I need to consider here?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60761
    
  65

I've never done anything but leave the buffer size at its default setting.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: How to determine correct buffer size?
 
Similar Threads
Best Way to Use LOG4J
IllegalStateException error
Writing the Response - Trying to generate an exception
Response buffering
JSP Page doubt?