Java marshaller performance

Seconding the Use of JibX. Like questzen, I found that JibX was 9 times faster than JAXB in my performance tests.

Also, make sure you have woodstox on the classpath when using JibX. I found woodstox's Stax Implementation is roughly 1050% faster than the Java6 implementation of Stax.


Make sure you create the JaxB context instance only once, creating the context takes some time as it uses reflection to parse the object's annotations.

Note that the JAXBContext is thread safe, but the marshallers\unmarshallers aren't, so you still have to create the marshaller for every thread. However I found that creating the marshallers when you already hold a jaxb context is pretty fast.