File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes JaxB conversion is taking too much time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JaxB conversion is taking too much time" Watch "JaxB conversion is taking too much time" New topic

JaxB conversion is taking too much time

Arun Vasu

Joined: Oct 05, 2010
Posts: 24

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,
Karthik Shiraly

Joined: Apr 04, 2009
Posts: 874

Can you post some code that shows relevant portions of how you're passing the XML file to JAXB and how you're invoking unmarshal?
Also, how is your system using those java objects after unmarshaling?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
For maximum speed I would use SAX parsing and a whole lot of custom code. Very tedious.

I agree. Here's the link:
subject: JaxB conversion is taking too much time
It's not a secret anymore!