You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Sebastian Bösl (JIRA)" <ji...@apache.org> on 2014/04/07 13:34:17 UTC

[jira] [Created] (CAMEL-7349) JaxbDataFormat should not parse the Schema over and over again

Sebastian Bösl created CAMEL-7349:
-------------------------------------

             Summary: JaxbDataFormat should not parse the Schema over and over again
                 Key: CAMEL-7349
                 URL: https://issues.apache.org/jira/browse/CAMEL-7349
             Project: Camel
          Issue Type: Improvement
          Components: camel-jaxb
    Affects Versions: 2.13.0, 2.12.3
            Reporter: Sebastian Bösl
            Priority: Minor


Currently the createMarshaller and createUnmarshaller methods parse the javax.xml.validation.Schema from scratch, which is a severe overhead considering that a Schema instance is threadsafe and it is  encuraged to re-use it as much as possible 
(see http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/Schema.html) 

I extended the DataFormat and cached the parsed Schema and did a small benchmark:
JaxbDataFormat: 3:18
AltJaxbDataFormat: 0:35





--
This message was sent by Atlassian JIRA
(v6.2#6252)