[jdom-interest] Maximizing Effeciency of XPATH calls

Paul Libbrecht paul at activemath.org
Fri Sep 9 12:54:26 PDT 2005

I'd be interested to know how much performance one can expect of such  
engines... we keep processing XML but end-up storing and retrieving  
with Lucene which has real good performances (like 1500 queries/second  
with about 7000 items overall of 50Mb on a single PC, they are about 20  
typical queries).

XML-databases that I try were way slower (by a factor of 10 or 100) but  
I never went till a real index.

What does such a commercial produce as Mark Logic achieve ?



Le 9 sept. 05, à 19:08, Jason Hunter a écrit :

> I don't know how much data you have, but if it's a lot you can use an  
> indexed XQuery engine to do the evaluation (one that indexes what it  
> sees during load time and optimizes XPath queries).  MarkLogic's  
> engine is free up to 50 Megs (see http://xqzone.marklogic.com for a  
> download and  
> http://xqzone.marklogic.com/howto/tutorials/technical-overview.xqy for  
> a quick intro).  I'm presently working for Mark Logic on a project for  
> a customer with terabytes of XML.
> -jh-
> Kevin L. Cobb wrote:
>> I've recently been tinkering with the effeciency of a process I have  
>> to take an XML document and apply a lot of XPATH expressions to the  
>> XML.
>> Here is what I've done to maximize the effeciency of this process.  
>> Hoping others will have other handy tricks up their sleeves or point  
>> out any
>> glaring deficiency.
>>  The basic algorithm of the process is this:
>>     1. Build a Map of the XPATH's to apply to the XML. The xpath
>>     expression is cached as org.jdom.xpath.XPath objects
>>     2. For each XML document to apply the Map of xpath expressions to
>>         3. Build the Document object from the XML string         4.  
>> Loop through the Map of XPath objects and apply each to the
>>     message.
>>     5 Next XML document
>>      The things I've done to increase performance are:
>>     1. Cached the xpath expressions as org.jdom.xpath.XPath objects
>>     2. Ensure the use of the SAXParser,  
>> org.apache.xerces.parsers.SAXParser
>>     3. Make each xpath expression as effecient as possible. For  
>> example,
>>     use /*/*/MyElement instead of //MyElement.
>> ---------------------------------------------------------------------- 
>> --
>> _______________________________________________
>> To control your jdom-interest membership:
>> http://www.jdom.org/mailman/options/jdom-interest/ 
>> youraddr at yourhost.com
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list