Joachim Draeger schrieb: > Hi Bernd, > > Am Freitag, den 17.11.2006, 08:42 +0100 schrieb Bernd Fondermann: > > >>> I also ran with jdk5 that code in a loop of 1 million iterations using >>> foo = "foo" and bar = "bar" (this is FAR from any realistic scenario). >>> >> <sigh> Microbenchmarking, again! ;-) >> Could it be you are testing loop optimization here? ;-) >> >> What also is totally obscured by the whole discussion, is to set in >> relation the max performance difference of the different logging >> implementations discussed here - the "delta" - to the cost of the >> rest of the method. Only if delta is a significant cost (a "hot spot") >> it is worth talking about optimizing it before optimizing everything >> else. >> > > +1 > > This is exactly my thought. As long as nobody showed me (even by a > extrapolation) that its costs are significant, I consider even those > is<Log>Enabled on a per command issue as programmers voodoo and rumors. > > IMO the users will benefit more from readable, maintainable code than > from 0.5 % memory savings and 0.5 % more concurrent connections. > (replace the numbers with your profiling results) > > +1
> BTW: I have often seen NPE *bugs* in debug messages, that appeared > magically when the costumer has turned on *de*bugging. :-) This could > avoided by putting a try/catch block around... > > Joachim > > Im against this.. Even if the NPE is in the debug message it should not catched. IMHO thats a bad practice.. NPE should fixed not "catched" ;-) bye Norman --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
