[OSM-dev] Ruby XML parsing... REXML or libxml?

David Sheldon dave-osm at earth.li
Thu May 18 22:56:50 BST 2006


On Thu, May 18, 2006 at 11:21:42PM +0100, nick at hogweed.org wrote:
> I seem to remember a while back that there had been a decision to change the 
> XML library from REXML to libxml, for performance reasons. However looking 
> round the Ruby XML parsing code in Subversion it's a mixture.... some code 
> uses REXML, others libxml.

Please use libxml. It isn't a lot harder to write parsers as far as I
can tell, and it is a lot faster. Getting used to writing for libxml
will stop you being tempted to write REXML code in the future. The only
reason that there are some still in REXML is that they haven't been
converted yet.

How often do you parse the config file? Obviously if it is for each
request then it does become a performance issue.

David
-- 
       "Abandon shop! Abandon shop! This is not a daffodil!"
          Holly in "Demons & Angels", Red Dwarf series V




More information about the dev mailing list