Selenium, XPath and Internet Explorer – Painfully Slow?

I’ve been using RobotFramework with its Selenium Library for web automation for quite a while now and have always had the problem of getting any scripts that use XPath run on Internet Explorer.

For some web applications, if they’re not too complex and don’t use a lot of Ajax, you might be able to run scripts that use XPath on Internet Explorer and actually have them finish in this lifetime. But most of the time, they won’t.
So I googled it. I found out that a lot of other people have googled it and a lot of them have complained on different forums. I’ve also found out that Selenium uses “AJAXSLT” as its default XPath library, which has a lot of performance issues on IE, and that the trick is to change this to the much faster javascript-xpath library.
However …