Ryan Davis | 18 May 06:05

Re: Ruby 1.9 compatibility and performance


On May 15, 2008, at 11:16 , DJ Cole wrote:

> 2) Performance - at least, a few modules, like the default REXML  
> parser.
> This thing took about 10 minutes to parse a simple 2 MB file just  
> once.
> It's unusable. I had to switch to libxml. Is this a Ruby artifact  
> (e.g.
> fundamentals like regular expressions just aren't up to snuff) or  
> just a
> bad module?

It is certainly slow and bloated if you do a full parse. If you switch  
to streaming it can be quite fast. Some of my students insisted on  
using it to parse my itunes xml db (7.9Mb) and actually got fairly  
good/usable times (not good enough to beat my regex version--but good  
enough to use).


Gmane