Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7350

JaxbDataFormat should not parse the Schema over and over again

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Unknown

    Description

      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 that parsed an input document 64000 times:
      JaxbDataFormat: 3:18
      AltJaxbDataFormat: 0:35

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            njiang Willem Jiang
            sbo13 Sebastian Bösl
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment