JaxB conversion is taking too much time
JaxB conversion is taking too much time
January 26, 2012 - 23:14
Hi All,
I have an issue with XML conversion to java using JAXB. The scenario is,
I have to parse a huge xml file to java objects. The xml will hold 30000 complex types with each one holds about 20 string elements. While parsing, it is taking 4 minutes to convert it in to java.
Could somebody show me some light to reduce the time taken for this conversion ?
Thanks in advance,
Arun





Which version of JAXB do you use? Do you really need to convert the whole XML? JAXB RI supports partial conversion e.g. - see [1]. for more info, there are additional samples in the standalone distribution. It would also be useful to share your schema and typical xml and do some profiling on where the time is spent.
MartiNG
[1] http://jaxb.java.net/guide/Dealing_with_large_documents.html