cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ken Barozzi" <nicola...@supereva.it>
Subject Re: Cocoon 2.0 Scalability Disappointment
Date Wed, 05 Dec 2001 17:06:38 GMT

----- Original Message ----- 
From: "Tom Klaasen (TeleRelay)" <tr-tklaasen@telerelay.com>
To: <cocoon-dev@xml.apache.org>
Sent: Wednesday, December 05, 2001 4:40 PM
Subject: RE: Cocoon 2.0 Scalability Disappointment




> -----Original Message-----
> From: [mailto:nicolaken@supereva.it] 
> > > I think this can be an appropriate timing to start cleaning up the 
> > >  logging code. We have to find a policy and stick to it: I 
> > >  tend to say 
> > > that we should *always* do a isDebugEnabled() or a isInfoEnabled() 
> > >  before spitting out Strings. I'm not that sure that such a 
> > > policy should 
> > > be enforced for levels of warn and above.
> > 
> >  I totally agree.
> > This sped up my app quite a bit.
> > Maybe a static utility method that does the check is nicers 
> >  than many ifs.
>
>How would you do that? The reason for calling the "isDebugEnabled()" is
>exactly to avoid all the work involved in concatenating the Strings
>you're providing as parameter. And this would also be done with static
>methods...

Correct, it was quite stupid of me not to think of this widely used case...
the fact is that my debug statements are usually Strings that are already
there, so I don't have overhead on it.
Instead of concatenating you could call the static method for debug
many times, one on each part, or use the command pattern with
pooled command classes... but I'm getting ridiculous ;-) , it's
not something to suggest ;-)

Nicola Ken Barozzi These are the days of miracle and wonder... 
                               ...so don't cry baby, don't cry 
<xml-cocoon@nicolaken.com> Paul Simon 


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


Mime
View raw message