castor

org.exolab.castor.xml.ValidationContext is wasting processing on string concatination within trace statements

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1, 1.1.1
  • Fix Version/s: 1.1.2
  • Component/s: XML
  • Labels:
    None
  • Number of attachments :
    0

Description

The isValidated, addValidated, and removeValidated methods within org.exolab.castor.xml.ValidationContext are all performing string concatination by calling the toString method of the object that is passed in to each of these methods.

This is causing serious performance problems (as we are pushing through tremendous load) and did not exist in version 1.0 and prior.

Here is an example of one of the problem lines of code that exists:

LOG.trace("Called isValidated(" + object + ")");

This should be checking the isTraceEnabled method before wasting processing on this concatination, like so:

if (LOG.isTraceEnabled())
LOG.trace("Called isValidated(" + object + ")");

Issue Links

Activity

Hide
Bill Robertson added a comment -

I'm glad this is fixed. It was a performance killer for us. We had to hack the jar with different version.

Show
Bill Robertson added a comment - I'm glad this is fixed. It was a performance killer for us. We had to hack the jar with different version.
Hide
Bill Robertson added a comment -

I forgot to add, I saw a number of other similar code in the sql section of castor. It doesn't affect us though.

Show
Bill Robertson added a comment - I forgot to add, I saw a number of other similar code in the sql section of castor. It doesn't affect us though.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: