Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-487

GzipCompressionProvider produces a lot of finalizable objects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.1.0
    • None
    • None

    Description

      GzipCompressionProvider.compress() and decompress() methods are called a lot inside and outside of the framework and each such call produces a java.util.zip.Deflater or Inflater object that are finalizable, that is bad for GC.

       

      Compressing or decompressing a finite byte[] object (in contrast to compressing/decompressing an InputStream or an OutputStream of unknown length) is actually a happy case because even PhantomReference object could be avoided, the native resources could be created and freed in a single try-finally block.

       

      Curator must avoid that. https://github.com/ymnk/jzlib is a potential replacement, for example.

       

      A similar issue could be also fixed in Apache Commons Compress: https://issues.apache.org/jira/browse/COMPRESS-473 and Curator is made to depend on Commons Compress.

      Attachments

        Issue Links

          Activity

            People

              cammckenzie Cam McKenzie
              leventov Roman Leventov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: