For help with XPath performance, try to avoid using the XPath recursive descent operator '//'. It is one of the most common mistakes that I see when reviewing under-performing XPath. For some reason, everyone just feels that they *have to* use it even
when they don't need it - doh!
Also, when possible, be as node-specific as possible in the XPath. In other words, if the node you are looking for can ever only be 5 levels deep, then your XPath query should be specified such that it only looks in the 5th level for the node instead of anything
above or below.
HTH