james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Angus" <danny.an...@gmail.com>
Subject Re: isLogEnabled() and StringBuffer
Date Tue, 14 Nov 2006 09:36:58 GMT
On 11/14/06, Bernd Fondermann <bernd.fondermann@googlemail.com> wrote:
> On 11/14/06, Joachim Draeger <jdraeger@gmx.de> wrote:

> Memory garbage should not be a problem any longer in the light of
> generational GCs.

I'm not sure how you arrive at this sweeping conclusion!
Profligate use of memory is a problem no matter what CG algorythm you
use because even if the collector is capable of collecting it uses
clock cycles to do it. This is a cost. If your application is reaching
the bounds of its resources, because it is under heavy load, then
unecessary use of cpu or memory will be a factor in the limits of
performance which you can reach.

A large number of string concatenations will always result in a lot of
allocations, even if it is optimised to use StringBuffer, unless you
are using StringBuffer directly you will have a string (or byte[] or
whatever) as input for each component part, a string buffer which is
larger than the output and an output string. Thus you use 200% more
memory than not doing it at all.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message