Skip to content

classgraph-4.0.5

Compare
Choose a tag to compare
@lukehutch lukehutch released this 08 Aug 10:33
· 3145 commits to latest since this release

Important bugfix and performance release.

Fixes a resource leak (ScanResult could not be garbage collected, because its shutdown hook was holding a reference to it) (#233, thanks to @jdeppe-pivotal for reporting).

The recommended usage for ScanResult is now to use it within a try-with-resources block, so that the ScanResult is not just left to be freed by the garbage collector calling the ScanResult's finalizer, since that can lead to unpredictably large GC pauses.

Numerous performance optimizations surrounding InputStream and FileChannel, as well as List#toArray() -- thanks to @johnou for several tips on improving performance. Disabled FileChannel on OS X, since it was always slower than just using InputStream in benchmarking.

Eliminated a number of extra buffer/array copies during file reading.