users@jaxb.java.net

Optimizing JAXB RI Unmarshal performance

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Fri, 21 Sep 2012 10:57:26 -0400

Hi Guys,

I am observing a 5 second delay in marshalling a POJO to XML using JAXB
/ JAXB-RI 2.2.3.

The size of the POJO is 27K (measured by writing to file). The
marshaling was to a StringWriter using code like this:

         JAXBElement elem = ...
         if (elem != null) {
             StringWriter sw = new StringWriter();
             marshaller.marshal(elem, sw);
         }

This seems excessive a delay but I have nothing to compare it to. Any
thoughts on whether this seems reasonable?
Are there any tricks to speed this up? Thanks for your help.

-- 
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com