From: <fa...@my...> - 2006-06-19 20:13:26
|
> The point is to replace all log.debug(".."); with > if(log.isDebugEnabled())log.debug("..");. That is because when > log.debug("foo" + intValue + "bar" + object.getValue()); is called, the > parameter is concatenated before the logger has a chance to decide wether > it is needed or not and constructing this string may be arbitrarily > complex. I would vote for responsibility of the developer to put this "if" condition in for cases where the creation of the string is really complex. other than that log4j is designed to have minimal overhead if you call log.debug with the log level above. this keeps the code cleaner. I think log.debug within very frequently executed loops should be removed after debugging and log.info statements should be kept outside of such loops. > I ran ten trainings of hepta.lrn before and ten after the changes with > standard settings and under the same conditions. With a mean of around 35 > seconds there was a speedup of around 0,5 seconds afterwards. Of course > also startup, rendering and anything else will profit. not all that significant, is it? what about std of speedup? bye fabian |