I think I mentioned in the original post, but I've also tried with pre-compiled (obviously out of the loop!) queries. Precompilation is an absolutely misnomer when it comes to performance. I've found the loop size has to be more than 10,000 elements to get any noticeable improvement. The fact that XPath is NOT THREAD SAFE makes it pointless to do this ...