JTar is a simple Java Tar library, that provides an easy way to create and read tar files using IO streams. The API is very simple to use and similar to the java.util.zip package.
FileOutputStream contains a finalizer which can cause excessive garbage
collector pressure when writing many TAR files.
Finalizers are only executed when the GC feels like it. Until they are
executed, objects with finalizers are not garbage collected. Internal
benchmarks have shown that hundreds of thousands of FileOutputStream
objects could remain in memory for a very long time as a result.
We've been using this internally for a few months, without any issues.
This patch reduces GC pressure.
FileOutputStream contains a finalizer which can cause excessive garbage collector pressure when writing many TAR files.
Finalizers are only executed when the GC feels like it. Until they are executed, objects with finalizers are not garbage collected. Internal benchmarks have shown that hundreds of thousands of FileOutputStream objects could remain in memory for a very long time as a result.
We've been using this internally for a few months, without any issues.