harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Blewitt" <alex.blew...@gmail.com>
Subject Re: [classlib] logging from within our implementation
Date Tue, 30 May 2006 21:38:12 GMT
On 30/05/06, Chris Gray <chris.gray@kiffer.be> wrote:
> If the implementation is an empty method and is final, a straightforward
> static flow analysis will show that the evaluation of the arguments can also
> be optimised away.

Not necessarily. Evaluation of arguments may have side-effects, and
therefore even if the call to the logging gets optimised away, the
evaluation may not be. It's better to have an array of Strings and let
the logger do the concatenation rather than have a single
Object/String and performing the concatenation, because then the
logger can do the concatenation through stream manipulation rather
than in-memory copying.

That said, I don't think there's a great benefit of having logging in
production code once it's complete, and I think that an aspect would
be a better way of compiling with debugging code in.


Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message