Title: RE: XPathAPI performance problems

I am also having XPath performance problems (which I
submitted to the dev group).  The problem seems to have
nothing to with querying a document multiple times.

In my case, I am parsing an XML schema file by first getting
the complexType nodes then looping through it's child elements.
If I loop over the complexType node list from the beginning the
average XPath call takes about 20ms to get a list of it's child nodes.
By time I get to the bottom, the child nodes are taking about
700ms to get, when it shouldn't take any longer. 

If I reverse the loop (end to beginning) the first nodes take about
~700ms while the end nodes (really nodes at the top of the document)
takes about 20ms.  It seems like the XPath routine is starting
from the top of document, no matter if you give it a parent or
not.

This process used to take about 2 secs, it is now up to over 2 minutes.

Hope this helps,
EricW

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 9:33 AM
To: Eric Chijioke
Cc: [EMAIL PROTECTED]
Subject: Re: XPathAPI performance problems



If you're going to query a single document multiple times, see the class
CachedXPathAPI. If I remember correctly, its javadoc summarizes the issues
involved.

Reply via email to