[XML-SIG] [ pyxml-Bugs-407007 ] Insane amount of memory lost in FromXml
nobody
nobody@usw-sf-web3.sourceforge.net
Thu, 08 Mar 2001 05:18:05 -0800
Bugs #407007, was updated on 2001-03-08 05:18
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=407007&group_id=6473
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Luke Kenneth Casson Leighton
Assigned to: Nobody/Anonymous
Summary: Insane amount of memory lost in FromXml
Initial Comment:
calling FromXml uses an INSANE amount of memory. the
larger the document, the more memory is lost. here is
a demonstration that uses Cyclops.py (found from
searches on python.org for memory usage).
#!/usr/bin/env python
"""
"""
resdata = """<root >
<Schema name="Schema1" >
</Schema>
</root>
"""
from xml.dom.ext.reader import Sax2
from Cyclops import CycleFinder
def test():
z = CycleFinder()
d = Sax2.FromXml(resdata, validate=0, keepAllWs=1)
z.register(d)
del d
z.find_cycles()
z.show_stats()
z.show_cycles()
z.show_cycleobjs()
z.show_sccs()
z.show_arcs()
print "dead root set objects:"
for rc, cyclic, x in z.get_rootset():
if rc == 0:
z.show_obj(x)
z.find_cycles(1)
z.show_stats()
if __name__ == '__main__':
test()
~
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=407007&group_id=6473