[xml-sig] _get_elements_by_tagName_helper taking resources
mail at jdborg.com
Thu Jun 14 14:59:43 CEST 2012
It was taking 30 seconds, now taking 3!
Joseph David Borġ
On 13 June 2012 19:35, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Joe Borġ, 13.06.2012 19:39:
> > I'm running a script with 2.7 that deals with some heavy XML files. I'm
> > trying to speed it up best I can; using cProfile I've seen what's taking
> > all the time. It's the function _get_elements_by_tagName_helper. Can
> > anyone tell me where this is called and if I can improve its runtime
> I assume you are using minidom? My (biased) advice would be to switch to
> lxml. It's substantially faster than mindom in basically all regards.
> Alternative, if that suits your needs, use the xml.etree.cElementTree
> package in the stdlib, which is also substantially faster but less capable.
> xml-sig mailing list
> xml-sig at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xml-sig