We’re hiring Understanding Ruby threads
Oct 08

REXML is the standard XML processing library for Ruby. It’s on Ruby’s core and is terribly slow.

Yeah, I know it’s pretty simple to use, got a nice interface and, again, it’s just there. And it is a good library, for most things. But if you, as me, came to a point that processing XML is taking 50% of the time to render a rails action, it’s time to change.

My tip? Use libxml instead. The numbers on their home page speak for themselves. Try it yourself, you won’t be disappointed. And I’m really happy with the performance increase on our app.

Related Posts

2 Responses to “Don’t use REXML. I mean it.”

  1. It is true that libxml is the fastest xml library for parsing xml in ruby. But it has been said that while hpricot is a bit slower than libxml (not much slower) it is nicer to use on the front end. So I would agree that not using rexml is the way to go. But you may want to also consider hpricot.

  2. I’ve used hpricot as well. Then it really comes down to a matter of taste, since their performance is not that different. Personally I like libxml better. But definitely, if you are well versed on hpricot, should be dead simple to use it for parsing XML. Tks for pointing out. :)

Leave a Reply

preload preload preload