[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Data-binding versus XQuery performance

  • From: Boris Kolpackov <boris@c...>
  • To: Michael Kay <mike@s...>
  • Date: Fri, 12 Dec 2008 09:22:33 +0200

Re:  Data-binding versus XQuery performance
Hi Michael,

Michael Kay <mike@s...> writes:

> First, I implemented the data binding approach using the reference
> implementation of JAXB.

It is not quite correct to compare a reference implementation to a 
commercial product.


> Then I looked at the cost of executing the query originally proposed by
> Boris: find persons whose age is less than X and whose gender is male, over
> a variety of age values (I used a linear distribution between 1 and 100).
> The average execution time was:
> 
>   JAXB                         0.42ms
>   Saxon-B (untyped)            9.43ms
>   Saxon-SA (typed)             6.85ms
>
> [...] 
>
> This time I measured the cost of doing the query, serializing it to HTML,
> and writing the results to a file:
> 
>   JAXB                       42.1ms
>   Saxon-B                   676.0ms
>   Saxon-SA                    7.5ms


The JAXB numbers look highly suspicious. Both the no-output and HTML
output queries do a single pass over the object model. The HTML output
test just adds the number increment and simple HTML formatting at the
end. And this resulted in a 100 times slowdown?

I also implemented this test with CodeSynthesis XSD (event-driven 
C++/Parser mapping). The test measures both XML parsing, query
execution, and HTML output to a file. Here are the numbers (I've
added the XML parsing and query times for JAXB and Saxon):

XSD without validation                25.9ms
XSD with validation                   27.9ms
JAXB                                 111.1ms
Saxon-B  without validation/untyped  751.0ms
Saxon-SA with validation/typed       199.5ms


> Those who said that declarative query languages for database access would
> never offer adequate performance were proved wrong by the end of the 1980s.
> It surprises me that 20 years later people don't recognize that the same
> applies to XML access.

Adequate performance means different things to different applications.
For some 7 times slower may not mean adequate.


Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.