I note that there was some recent discussion about fixing DOMNameSpaceNode on this list. I'd like to bring up a (perhaps) related issue: the dom_reconcile_ns() function which is called whenever a new namespaced node (for example, created with Document#createElementNS) is inserted into the tree. dom_reconcile_ns() does a full walk up to the root of the DOM (via the call to xmlSearchNsByHref) which can create a quadratic slowdown for deeply-nested documents.
What is this function doing? Can we do it lazily? Technically HTML elements should be created in the HTML namespace, but doing so leads to extreme performance loss -- parsing a 2MB file goes from 0.4s (with Document#createElement()) to 2.5s (with Document#createElementNS()). --scott -- (http://cscott.net)