users@jaxb.java.net

Re: JAXB 2.0 latest snapshot performance

From: JAXB User <jaxbuser_at_yahoo.com>
Date: Mon, 10 Oct 2005 11:43:03 -0700 (PDT)

Kirill,
 
Thanks for rerunning the tests. Since I've run them myself now, I can appreciate the amount of time and effort it takes!

Regarding the subjective ranking that I brought up on a post to your bindmark project mailing list, I understand that you use a concise set of criteria rather than a full feature set. I just wanted to bring to your attention that the points you bring up for XMLBeans on the negative side are no longer true, and many of the positive points brought up for other products are true for XMLBeans but are not listed. For example, XMLBeans
 
- does not require a .xsdconfig file. Without a config file, defaulting is used in a similar manner as other libraries such as JAXB 2.0.
- does not include the overhead of allocating the whole hierarchy during marshalling (as shown by your updated results)
- generates meaningful error messages with line numbers and hints (and links back to the binding objects)
- uses generics to enforce strong typing for collections. Note that this is optional so that pre 1.5 JVMs can continue to be supported.
- provides ant tasks and command line interface for compiling XSDs (including incremental compilation).
 
Perhaps you did the subjective ranking on a pre 2.0 version of XMLBeans?
 
Regards,
 
    Giac

Kirill Grouchnikov <kirillcool_at_yahoo.com> wrote:
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 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 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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net


                
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.