Happy new Year !

As my first statement on the mailing list in the new year and millenium,
I'd like to thank all who helped creating the JetSpeed 1.3a1 release,
especially Raphael who must have worked day and night. Great job ! It's
very cool that JetSpeed can now be installed so easily.

In JetSpeed, there are statements like this in a lot of places:

// always creates 3 new String objects
Log.note("SimpleTransform:  transforming url: " + url +
         " with stylesheet: " + stylesheet_url );

These tracing statements are very useful during development, but when
JetSpeed is deployed in a production environment, it should be possible to
turn off tracing for performance reasons. To allow to effectively disable
all tracing overhead including creation of trace message strings,
statements like this

// creates new String objects only if Log is logging
if (Log.isLogging()) {
  Log.note("SimpleTransform:  transforming url: " + url +
           " with stylesheet: " + stylesheet_url );
}

can be used. (Just doing filtering in the Log.note() method instead of
explcitly checking whether the log object is actually logging would still
result in creation of 3 new Strings per request for the example above.)

I think an isLogging() method should be added to Turbine's Log class and
that we should change the logging in JetSpeed to consistently use the
isLogging() method before making Log calls in order to minimize object
creation/garbage collection overhead when tracing is disabled.

What's your opinion ?

Best regards,

Thomas

Thomas Schaeck
IBM Pervasive Computing Division
Phone: +49-(0)7031-16-3479 e-mail: [EMAIL PROTECTED]
Address: IBM Deutschland Entwicklung GmbH,
Schoenaicher Str. 220, 71032 Boeblingen, Germany




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?:          [EMAIL PROTECTED]

Reply via email to