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

Martin Schaaf ms at 101tec.com
Thu Jun 19 08:11:49 EDT 2008


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.



More information about the XOM-interest mailing list