Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Fwd: Very high main memory consumption on compression level higher then 0

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Martin Schaaf <ms AT 101tec.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Fwd: Very high main memory consumption on compression level higher then 0
  • Date: Thu, 19 Jun 2008 14:11:49 +0200

Soory for the private mail.

Anfang der weitergeleiteten E-Mail:

Von: Martin Schaaf
Datum: 19. Juni 2008 13:47:28 MESZ
An: Wolfgang Hoschek <>
Betreff: Re: [XOM-interest] Very high main memory consumption on compression level higher then 0


Am 18.06.2008 um 21:49 schrieb Wolfgang Hoschek:

The native java.util.zip.Deflater/Inflater are used if the compression level is non-zero. Does the high mem usage go away if you reuse the same _binaryXMLCodec instance for all documents? If so, it probably has something to do with the Deflater and/or Inflater leaking memory or their finalizer not being called in time.

I tried your suggestions with using the same BinaryXmlCodec object for all documents, but I get the following exception:

java.lang.NullPointerException
at nux.xom.binary.BinaryXMLCodec.writeIndex(BinaryXMLCodec.java:1466)
at nux.xom.binary.BinaryXMLCodec.writeIndex(BinaryXMLCodec.java:1461)
at nux.xom.binary.BinaryXMLCodec.writeText(BinaryXMLCodec.java:1456)
at nux.xom.binary.BinaryXMLCodec.writeChild(BinaryXMLCodec.java:1340)
at nux.xom.binary.BinaryXMLCodec.writeElement(BinaryXMLCodec.java: 1354)
at nux.xom.binary.BinaryXMLCodec.writeChild(BinaryXMLCodec.java:1338)
at nux.xom.binary.BinaryXMLCodec.writeElement(BinaryXMLCodec.java: 1354)
at nux.xom.binary.BinaryXMLCodec.writeChild(BinaryXMLCodec.java:1338)
at nux.xom.binary.BinaryXMLCodec.writeElement(BinaryXMLCodec.java: 1354)
at nux.xom.binary.BinaryXMLCodec.writeChild(BinaryXMLCodec.java:1338)
at nux.xom.binary.BinaryXMLCodec.writeElement(BinaryXMLCodec.java: 1354)
at nux.xom.binary.BinaryXMLCodec.writeChild(BinaryXMLCodec.java:1338)
at nux.xom.binary.BinaryXMLCodec.writeElement(BinaryXMLCodec.java: 1354)
at nux.xom.binary.BinaryXMLCodec.writeDocument(BinaryXMLCodec.java: 1276)
at nux.xom.binary.BinaryXMLCodec.serialize(BinaryXMLCodec.java:699)
at nux.xom.binary.BinaryXMLCodec.serialize(BinaryXMLCodec.java:657)

Is it thread safe?

Bye,
martin.





Archive powered by MHonArc 2.6.24.

Top of Page