users@jaxb.java.net

Re: JAXB 2.0 latest snapshot performance

From: Kirill Grouchnikov <kirillcool_at_yahoo.com>
Date: Fri, 7 Oct 2005 01:46:12 -0700 (PDT)

Giac,

Sorry for the delay. See [1] for the new results of
XmlBeans, and how it ranks compared to JAXB / JAXB 2.0.
About the list of XmlBeans features - BindMark provides
concise information and not the complete feature list. See
project FAQ for the explanations.

Thanks for the code tip.

Regards
Kirill

[1]
https://bindmark.dev.java.net/servlets/NewsItemView?newsItemID=2786


--- JAXB User <jaxbuser_at_yahoo.com> wrote:

> Kirill,
>
> The cost of object allocation is taken into account
> during unmarshalling, since this is where the object
> hierarchy is created. I don't quite understand why this
> would be counted again during marshalling. If you're
> going to count the creation of the object hierarchy for
> the marshalling benchmark, just make sure your consistent
> across all of the products tested. For example, add the
> cost of
>
org.jvnet.bindmark.benchmark.test.Jaxb2Test.createHierarchy
> (365 kB, 10,812 alloc.) durinig marshalling for JAXB 2.0.
>
> James
>
> Kirill Grouchnikov <kirillcool_at_yahoo.com> wrote:
> Giac,
>
> I still consider the initialization of the binding
> library
> as part of one-time marshalling. Although it happens in
> the
> creation phase, it affects the overall footprint of the
> process. Compared to other libraries, you not only "pay
> the
> price" of object allocation of your own hierarchy (which
> is
> ignored in the tests), but also the allocation of
> XmlBeans.
> That's why i don't ignore it in the results.
>
> Kirill
>
> --- JAXB User wrote:
>
> > Kirill,
> >
> > The XMLBeans functions you mentioned are not part of a
> > one-time marshalling cost, they are part of the
> creation
> > of the object hierarchy, which as you explained before,
> > is not counted in the marshalling benchmark. I believe
> > all the one-time marshalling cost is captured under the
> > org.apache.xmlbeans.XmlObject.save call, since the
> first
> > run takes quite a bit more memory than each subsequent
> > iteration.
> >
> > It would be interesting to measure creation performance
> > as a separate benchmark, but I'm sure there's no
> shortage
> > of other stuff to keep you busy! :-)
> >
> > Regards,
> >
> > Giac
> >
> > Kirill Grouchnikov wrote:
> > Giac,
> >
> > Thanks for the suggestions. I'll test the XMLBeans on
> it.
> > However, it seems that you have missed the one-time
> cost
> > of
> > initializing the XMLBeans. In
> >
> org.jvnet.bindmark.benchmark.marshal.MarshalerThread.run
> > go
> > to
> >
>
org.jvnet.bindmark.benchmark.test.XmlBeansTest.createHierarchy
> > and to
> >
>
org.jvnet.bindmark.gen.xmlbeans.OrganizationDocument$Factory.newInstance.
> >
> > You'll see the constructor of XmlBeans object which
> takes
> > additional 3.190KB and 25.570 objects.
> >
> > I'll update the reports over the weekend
> > Kirill
> >
> > --- JAXB User wrote:
> >
> > > Kirill,
> > >
> > > The numbers I get using your method outlined below
> are
> > > actually still quite a bit different. So far I've
> > > benchmarked Sun's JAXB 2.0 reference implementation
> > (from
> > > 9/19/05) and XMLBeans (v2), several times with the
> same
> > > results. One important change I made in the XMLBeans
> > > test is how marshalling is performed. Instead of
> > > creating a string out of the XML being marshalled and
> > > then serializing it, I use the save method on their
> > base
> > > object like this:
> > >
> > > ((XmlObject)hierarchy).save(baos);
> > >
> > > So the lower numbers I get (i.e. 6595kb versus
> 101238kb
> > > and 140ms versus 25864ms) would be explained by this.
>
> > > Would it be possible for you to make this change on
> > your
> > > end?
> > >
> > > To get the Level time number, I multiple the average
> > time
> > > reported to System.out by the number of iterations
> > (i.e.
> > > 1000 iterations for small, 100 for medium, and 10 for
> > > large data sets).
> > >
> > > My setup is as follows:
> > >
> > > JDK 1.5.0_03
> > > Windows XP SP 2
> > > Dell Lititude D600 with 1.86Ghz Intel Pentium M
> > > processor and 2GB RAM
> > > JProfiler 4.0.9
> > > Below are the results I get. Regards,
> > >
> > > GIac
> > >
> > >
> > > Marshaling
> > >
> > >
> > >
> > > Time (ms)
> > >
> > > Memory (kb)
> > >
> > > Memory (objects)
> > >
> > > Startup
> > >
> > > Level
> > >
> > > startup
> > >
> > > level
> > >
> > > startup
> > >
> > > level
> > >
> > > JAXB 2.0
> > >
> > > Small data sets
> > >
> > > 6.2
> > >
> > > 122
> > >
> > > 7579
> > >
> > > 5349
> > >
> > > 89689
> > >
> > > 53041
> > >
> > > Medium data sets
> > >
> > > 21
> > >
> > > 179
> > >
> > > 7740
> > >
> > > 15976
> > >
> > > 91132
> > >
> > > 133759
> > >
> > > Large data sets
> > >
> > > 65
> > >
> > > 140
> > >
> > > 8239
> > >
> > > 6595
> > >
> > > 96118
> > >
> > > 63474
> > >
> > > XMLBeans
> > >
> > > Small data sets
> > >
> > > 39
>
=== message truncated ===



                
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com