users@jaxb.java.net

Re: JAXB and very large instance documents

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 24 Sep 2003 16:34:05 -0700

> Does anyone have any metrics or even a feel for how JAXB reference
> implementation performs for documents of this size? For example the size
> of the resulting unmarshalled document, how much temporary object
> allocation is done during unmarshalling and validation. My customer is
> suggesting that they want to scale the application beyond these sorts of
> sizes and my feeling is that the JAXB model of absorbing SAX events to
> produce a single unmarshalled object will not scale well for documents
> of this size and that a more event-based approach is required.

I'm not sure what you mean by "more event-based approach" than SAX, but
I guess the question is whether it makes sense to load the entire
document up in memory.

If you have to have everything in memory, then I guess JAXB is pretty
reasonable in terms of memory foot print. You could throw in some
String.intern()s and that helps to reduce the footprint even further.
(assuming you have repetitive strings)

But you should really think about a way to avoid loading everything into
memory. If you can process it chunk by chunk, then you should look at
the sample/partial-unmarshalling.


I can't really comment on other solutions, but have you checked out
RelaxNGCC? (http://relaxngcc.sourceforge.net/)

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net