Speed up RightAWS by Enabling libxml

So I was profiling our app the other day and discovered it was spending a significant amount of time in REXML.

“REXML?” I thought. “Who uses REXML in 2009?” For anyone who doesn’t know, REXML is Ruby’s standard pure-Ruby XML parser. It’s advantage is that it’s always available. It’s disadvantages include being very, very slow as well as having some significant deficiencies as an XML parser.

As it turns out, RightAWS uses REXML. By default, at least. But it can also use libxml-ruby. So long as you have libxml-ruby installed, all you have to do is put this somewhere in your app startup:

…and you should see significantly faster AWS communication.