Benefits of xml.dom.minidom?

John Gordon gordon at panix.com
Thu Oct 20 13:46:31 EDT 2011


I recently inherited some code that uses xml.dom.minidom to build a large
XML document, and I noticed that it is quite slow and uses a ton of memory.

I converted the same code to use lxml.etree and it is much faster and
uses not nearly so much memory.

Why is minidom so hungry for resources?  What is it doing with all that
memory and CPU?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list