[XML-SIG] PyXML API problem

Kamel Hamard (LMC) kamel.hamard at ericsson.com
Wed Jul 16 09:56:38 EDT 2003

I forgot to specify all the versions I'm using. 

OS : SunOS 5.7
python version : 2.2.2
PyXML Version : 0.8.2
4Suite version : Version 1.0a3


-----Original Message-----
From: martin at v.loewis.de [mailto:martin at v.loewis.de]
Sent: Wednesday, July 16, 2003 12:49 AM
To: Jeremy Kloth
Cc: Kamel Hamard (QC/LMC); 'Fred L. Drake, Jr.'; xml-sig at python.org
Subject: Re: [XML-SIG] PyXML API problem

"Jeremy Kloth" <jeremy.kloth at fourthought.com> writes:

> I forget to mention one other thing.  By using gc.collect() you are simply
> telling Python to run the collection cycle, which is something that it does
> itself at some interval.

Interestingly enough, for XML DOM, the collection frequency might be
too low. Python invokes collection every 700 (used to be 1000)
allocations of container objects. If you have documents with little
structure and large CDATA, the string objects (which are not accounted
for in cyclic thresholds) could consume a lot of memory.

So if invoking gc.collect explicitly helps, you might just as well
invoke gc.set_threshold, to invoke automatic collection more


More information about the XML-SIG mailing list