Title: XPath Performance
Eric,
 
Could you retry using Xalan 2.1
And measure time differences ?
We noticed a huge speed increase.
 
Geert
----- Original Message -----
Sent: Wednesday, December 19, 2001 6:39 PM
Subject: XPath Performance

Hi,

I am having some performance problems with XPath I was
hoping you could help with.

I am writing an app that parses an xsd file by first doing a
selectNodeList on all the <complexTypes> elements then a
selectNodeList on all the <sequence/element> elements using complexType
as the parent. 

When I went from parsing a small xsd to a larger one (about 140 complexType) nodes
I noticed significant performance problems with load times over 2 minutes.
I started checking and found the selectNodeList on the <elements> elements
was starting out well but then ended up being very slow by time I got
to the end (bottom) nodes (top nodes: ~50ms.  Bottom nodes ~700 ms).

It seems the xpath is searching from the start of the document everytime
when that is not necessary.  The exact call is selectNodeList(elemComplexType,
"sequence/element").  When I removed this and made my own norrow routine for this
search, the time went down to 0ms and the load for the entire file dropped to
about 2 secs.  Am I doing anything wrong or is XPath searching from the start
of the document.  I need to resolve this, since my app uses XPath extensively.

Thank you,
Eric Walsh

Reply via email to