cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@managingpartners.com>
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 :)
-pete

-- 
peter royal -> proyal@managingpartners.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message