MemoryError with minidom in Python

你离开我真会死。 提交于 2019-12-06 05:58:30

I also suggest the builtin cElementTree. Minidom has a lot of issues :/

Otherwise lxml is also quite good and has more features.

I seems minidom can occupy a lot of memory.

I tried to parse a file of 56MB, which takes 8G memory to read it.

you do the math..

libxml2 is faster and without memoryleak, but it's too C like to be any good and has horrible documentation

lxml is a layer over libxm2 and the etree module so that is the python way with libxml2 performance

http://lxml.de/

edit:typos

Well, the traceback suggests you're running in the PyDev debugger, so, have you tried running it inside Eclipse without the debugger?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!