users@jaxb.java.net

Re: Making JAXBContextImpl serializable

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 07 Nov 2006 14:04:45 -0800

Eric Crampton wrote:
> Hi Kohsuke and Kenny,
>
> I have a pretty big schema and I was able to get it to run through the
> NetBeans profiler. Here's what I found.

Thanks for the profiler output. This is just what I need.

> The schema is about 1.2 MB of XSDs. This generates about 2.5 MB of
> Java source and 891 KB of Java class files. On my test machine,
> JAXBContext.newInstance takes around 4,031 ms. I wrote a simple app
> which just does a JAXBContext.newInstance and ran it through the
> Netbeans profiler. The profiler says running the app took 28520 ms.
>
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate : 18204 ms
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet : 9993 ms
>
> Inside getOrCreate:
> java.lang.reflect.Constructor.newInstance : 10390 ms
> com.sun.xml.bind.v2.runtime.property.AttributeProperty.<init> : 7450 ms
>
> Deep down in getTypeInfoSet:
> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo : 8512 ms
>
> There's a rough view. I have uploaded the Netbeans Profiler custom
> file output to here:
>
> http://www.eonomine.com/jaxbperf.nps
>
> I'm a Netbeans Profiler newbie, so I'm not sure how useful that NPS
> file is to someone without the rest of my stuff. The schema I'm using
> is very real-world, but not proprietary, so I can package it all up
> along with my simple build.xml file if that would be helpful.

I'll make a few changes and post a new 2.0 nightly. Can you rerun it
again with the new jars and send me the new profiler snapshot?

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com