cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject [C2]: Performance and logging
Date Tue, 07 Aug 2001 10:35:42 GMT

I know that we had this discussion some time ago, with no real solution,
so I thought: why not start it again?

Looking at the way logging is performed in cocoon 2, I think this is
not very fast. Here an example:

  getLogger().debug("Creating new Templates in " + this + " for " +

Even if the priority debug is disabled, the method getLogger() (from
AbstractLoggable) is called
returning the logger, the expensive string concatenation is performed and
the debug() method
of the logger is called. And these steps are done for every debug message!

We should change two things here:
a) Replace the getLogger() call with the use of an instance variable logger.
   This requires to make an own AbstractLoggable class which offers the
logger as an instance
   variable and not via a method.
b) Before logging testing the priority.

So the example above should read:

  if (this.logger.isDebugEnabled() == true) {
    this.logger.debug("Creating new Templates in " + this + " for " +

Comments? Ideas? Suggestions? Volunteers?


Open Source Group                        sunShine - b:Integrated
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn                          mailto:

To unsubscribe, e-mail:
For additional commands, email:

View raw message