• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JaxB conversion is taking too much time

 
Arun Vasu
Greenhorn
Posts: 24
Android Java MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For maximum speed I would use SAX parsing and a whole lot of custom code. Very tedious.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic