Aaron Mulder <[EMAIL PROTECTED]> wrote:

>       Do you know how much a StringBuffer grows by?  Is it a fraction of
>the current, or a fixed amount?

According to "Java Performance and Scalability" by Dov Bulka, the
default size of a StringBuffer is "typically 16", and on expansion
"Typically, the new capacity will be twice as large as the old one".

See Optimization 8: Reserve StringBuffer Capacity.

This is an excellent book, and includes a complete JDBC connection pool
implementation, including caching of PreparedStatements in an appendix.
-- 
Justin Forder

Reply via email to