XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Performance comparisons of tree models

You are correct - our current implementation doesn't cache compiled 
XPaths, so that cost was included in the comparison.  I suppose we'll 
want to begin doing that (caching, as we already do for XSLT).

-Mike Sokolov

On 09/12/2012 03:16 PM, Michael Kay wrote:
>
> I think JDOM 1.0 uses Jaxen as its native XPath implementation, so you 
> are comparing JDOM/Jaxen with TinyTree/Saxon, whereas we were 
> comparing JDOM/Saxon with TinyTree/Saxon. Part of the cost of the 
> JDOM/Saxon combination is the bridge from the JDOM model to our 
> internal model: we have to "wrap" JDOM to implement the interfaces our 
> engine works with.
>
> It's also possible that you were including the cost of expression 
> parsing and optimization, whereas we were only measuring execution. 
> For simple XPath expressions run against smallish documents the cost 
> of parsing may well dominate the evaluation cost. For the scenario 
> where simple XPath expressions are issued directly by a Java 
> application and the XML document is small, Saxon probably puts more 
> effort than is justified into compiling and optimizing the expression 
> before execution.
>
> Michael Kay
> Saxonica
>
>
> On 12/09/2012 19:51, Mike Sokolov wrote:
>>
>>
>> On 09/12/2012 01:19 PM, Michael Kay wrote:
>>> I have been doing some performance comparisons of different Java XML 
>>> tree models, as used by Saxon, and the results may be of general 
>>> interest:
>>>
>>> http://dev.saxonica.com/blog/mike/2012/09/index.html#000194
>>>
>>> Of course, this is a measurement of one particular workload and the 
>>> results may not extrapolate to other workloads.
>>>
>>> Michael Kay
>>> Saxonica
>>>
>> What a coincidence ... I have just this week been doing a performance 
>> comparison that is somewhat similar to that.
>>
>> I compared Saxon TinyTree with JDOM's XPath 1.0 implementation in a 
>> common use case for our platform: mapping XML documents to Java 
>> entity objects.  I did find a substantial improvement using TinyTree, 
>> although nothing like the amount that you demonstrate. Our test 
>> involves running a large number of independent XPath expressions.  
>> These expressions are typically simple, involving one or two child 
>> steps and mostly no function calls.
>>
>> I saw a 30-40% improvement moving from Saxon to JDOM (so JDOM numbers 
>> about 1.5 on the scale in your blog post).
>>
>> I'm not sure why the numbers are at such a variance to those you 
>> report, but there are a number of differences between what we've done 
>> that could explain it: I used JDOM XPath with JDOM Documents; I guess 
>> it might be interesting to compare Saxon XPath.  Also, the 
>> expressions we tested were extremely simple, and it seems likely that 
>> differences are less noticeable in that case.
>>
>> At any rate, the difference is significant enough that we will 
>> definitely be moving towards switching our data model to TinyTree.  I 
>> expect to see additional gains beyond what I've measured due to 
>> lowered memory footprint, and we have not yet measured any impact on 
>> XSLT performance, which should also improve substantially based on 
>> what you report.
>>
>> -Mike Sokolov
>>
>> _______________________________________________________________________
>>
>> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>> to support XML implementation and development. To minimize
>> spam in the archives, you must subscribe before posting.
>>
>> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>> subscribe: xml-dev-subscribe@lists.xml.org
>> List archive: http://lists.xml.org/archives/xml-dev/
>> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>>
>>
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS