Feb
24
Cleaner CDK Code #9: using the LoggingTool
A trick I used from Miguel Howard (of Jmol fame) is to not concatenate String until really needed. String concatenation will allocate new Strings, and thus burden the garbage collector (yeah, you lucky Fortran users who think twice before allocating memory :). Some time ago, he suggested this trick for the logger. I think in Jmol, but the CDK inherited that idea.
Don't concatenate Strings when calling the LoggingTool
Logging in the CDK can be turned off, and in production use, I often do. Therefore, we can make it speed up by concatenating debug message String only when debugging is turned on. The CDK LoggingTool can take care of this, so you should pass the Strings are individual parameters to the logger call.
Don't concatenate Strings when calling the LoggingTool
Logging in the CDK can be turned off, and in production use, I often do. Therefore, we can make it speed up by concatenating debug message String only when debugging is turned on. The CDK LoggingTool can take care of this, so you should pass the Strings are individual parameters to the logger call.