cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <>
Subject Re: Cocoon 2.0 Scalability Disappointment
Date Wed, 05 Dec 2001 17:01:29 GMT
On Wednesday 05 December 2001 10:36 am, Tom Klaasen (TeleRelay) wrote:
> Use StringBuffers. Check for log.isDebugEnabled(). Especially in loops.
> In May, this speeded up our application from 1s to 0.1s for certain
> pages (a speedup of euh... has anyone studied advanced math? ;) )

And be sure to set reloadable=false for the context in tomcat!

When you mention use StringBuffers, is it better to do

StringBuffer sb = new StringBuffer();

return sb.append("this").append("is").append("a string");

rather than

return "this" + "is" + "a string";


I was under the impression that the compiler would optimize the second case. 
I do know to use a StringBuffer when in a loop that you're appending to a 
string in tho :)

peter royal ->

To unsubscribe, e-mail:
For additional commands, email:

View raw message