geosolutions-it / jai-ext

Java Advanced Imaging Open Source Replacement Wannabe
Apache License 2.0
90 stars 38 forks source link

Reading images with the turbojpeg extension can clog up the finalizer queue #212

Closed aaime closed 5 years ago

aaime commented 5 years ago

Investigating a OOM found with load testing on JPEG compressed TIFF images as source which was happening only when the TurboJPEG reader was enabled, I've found the following:

The "fix" is to hold onto a TJDecompressor (the image reader is not meant to be thread safe) and reuse it for the life of the reader instead, reducing the load factor on the finalizer queue by a factor of 100.

aaime commented 5 years ago

Wrong repo