Of course having any extra statements in a program is going to cost in terms of CPU time. The questions is how much. I have seen simple removeal of code, as well as addition of code make massive differences to the time it costs to run something. I have also seem it make no visible difference as well. The trick is to run it both before and after the code changes so that you can measure how big a change it is.
I would suggest do a run with the logging code in, and then one without. If the difference is not great, then leave the code in as you never know when you will need it. If there is a large difference then you have to decide how important it really is. cio Derek. On Wednesday 10 December 2003 10:17, Tolle Krez wrote: > Sorry for an off-topic post. I hope I will get an answer since this is a > very active mailing list. > > I am using Log4J for logging in my current project with too many logging > statements. I wrap every logging statements with the isDebugEnabled(), > isWarnEnabled(), etc. During production , the logging level will be set to > very minimum, and only critical errors will be logged. But however, the > boolean comparison statements (whether or not to log) will be executed, > which we feel will have a performance impact. > > I would like to know if it is a good idea to pre-process the java code to > remove all the logging statements and then create the binary?? or to begin > with, limit the number of logging statements during the development process > itself?? If pre-processing the source code to find and remove logging > statements.. is a better option, then can some one point me to a good java > pre processor? > > Thanks in Advance. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Derek Clarkson .O. Analyst/Programmer ..O Waterwerks Pty Ltd OOO Melbourne, Australia --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

