[jdom-interest] XPATH engine
marc at anyware.co.uk
Wed Nov 9 11:59:47 PST 2005
Kevin L Cobb wrote:
> I am trying to tune some processing that uses JDOM to apply about 1000
> XPATH expressions to a batch of XML files. I am using Xerces as my SAX
> parser implementation and thought about replacing this with something
> more speedy. But, the bulk of the work is really in applying these XPATH
> expressions, not in actually parsing the XML. I am caching the
> expressions as XPath objects and also only parsing the source XML into a
> Document object once.
> I'm wondering if JDOM allows me to replace the XPATH implementation with
> other implementations - I think that the default is JAXEN. Are there
> speedier XPATH implementations available?
> Any advice on increasing the speed here would be well received. Thanks
> in advance.
For what it's worth, it's probably cheaper to add a bit of horsepower to
your machine rather than labour trying to optimize such things. I know -
I rally against this kind of attitude myself most of the time, but with
things as complex as XPath and the time taken to find and test "faster"
alternatives... you could have it fixed by lunchtime with some more RAM
or a new machine with an extra CPU :)
That is, unless you are already running on a fully populated 48 CPU Sun
E25K server ;-)
Managing Director, AnyWare Ltd.
More information about the jdom-interest