users@jaxb.java.net

JAXBContext extremely slow for large XML schemas

From: Manfred Sturm <manfred.sturm_at_ITPEARLS.COM>
Date: Tue, 21 Jan 2003 07:17:39 -0700

This message was originally submitted by manfred.sturm_at_ITPEARLS.COM to the
JAXB-INTEREST list at JAVA.SUN.COM. If you simply forward it back to the list,
using a mail command that generates "Resent-" fields (ask your local user
support or consult the documentation of your mail program if in doubt), it will
be distributed and the explanations you are now reading will be removed
automatically. If on the other hand you edit the contributions you receive into
a digest, you will have to remove this paragraph manually. Finally, you should
be able to contact the author of this message by using the normal "reply"
function of your mail program.

----------------- Message requiring your approval (16 lines) ------------------
Hi

in order to process previously exported Microsoft Visio XML files, I decided to use JAXB for unmarshalling. After converting Microsofts xdr schema into xsd, the xjc tool generated > 2000 JAXB files into the package 'com.itpearls.visio.jaxb'. Well, no problem so far.

Now, creating a JAXBContext instance takes (including heavy disk I/O) more than a minute when using:

JAXBContext jc = JAXBContext.newInstance("com.itpearls.visio.jaxb");

Questions:
0) what can I do to speedup the context creation of large XML schemas?
1) does the JAXB RI reconstruct the schema out of the generated classes found in package 'com.itpearls.visio.jaxb'? (would be a poor implementation of the JAXB RI)
2) what is the generated file 'bgm.ser' for? Does it contain schema information, which could be used by the JAXBContext class? (wild guess)
3) Are there any other JAXB RIs to do a better job?

Thanx for any help
Manfred