Title: RE: Performance of XPathAPI, selectSingleNode()

HI!

> If you're issuing repeated queries against the same document,
> you might
> want to look at the CachedXPathAPI class I added yesterday.
> We're still
> refining that, but I suspect your benchmark falls into
> _exactly_ the sort
> of case this alternative is intended to address.

I see, so MXSML3 does some caching inside to speed things up.

I have tried to vary the query in a primitive way, but that did not slow down MSXML3:

    for(i = 1; i <= 10000; i++) {
      node = XPathAPI.selectSingleNode(doc, "/root/p2sales/SalesReceipt/newItem" + i);
    }


    for(i = 1; i <= 10000; i++) {
      node = XPathAPI.selectSingleNode(doc, "/root" + i);
    }

Thomas

Reply via email to