Skip to main content

JaxB conversion is taking too much time

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2012-01-26

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,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-10-01

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.


Joined: 2012-01-26

Thank you snajper :)

Yes,I really need to convert the whole XML. The average size of the XML will be always 30 t0 45 MB.