Page 1 of 1

XPath is REALLY slow

Posted: Thu Mar 31, 2005 10:17 pm
by johnb
I have a XML document that is about 700KB. It has no schema, and is a flat list of <entry> elements (about 2200 of them).

If I enter "/Events/event" in the XPath 1.0 text box in the upper right, it takes nearly one hour before a list of events shows up in the results window. The same XPath query returns almost instantly when I tried Stylus Studio. This is a huge problem, as I tend to use Xpath a lot (and I don't even consider 700KB to be a very large document).

I'm running on a Pentium 4 PC, 2.4 GHz, 1GB RAM, Windows XP. I don't think my PC configuration is the problem.

Despite this, I do like Oxygen a lot. It's just disappointing that Xpath is so slow. Otherwise, you guys have a great product.

(By the way, is there a way to cancel a running XPath query? If there is, I couldn't find it -- I had to shutdown Oxygen to get it to stop executing.)

Thank you,
John

Posted: Fri Apr 01, 2005 11:14 am
by george
Hi John,

The XPath 1.0 evaluation support is based on Xalan. The XPath 2.0 evaluation support is based on Saxon. Please try changing to XPath 2.0 (using the drop down menu activated on the down arrow next to the XPath 1.0 button) and see if you get acceptable results (I guess you will get a lot better time).

There is no support for stopping an XPath evaluation. I will add this on our bugzilla but at the first glance it seems difficult to implement as the processing is deep inside Xalan/Saxon.

Best Regards,
George