GetPrimitiveArrayCritical vs GetByteArrayRegion: 140x slow-down using -Xcheck:jni and java.util.zip.DeflaterOutputStream
Alan Bateman
Alan.Bateman at oracle.com
Mon Mar 5 08:42:12 UTC 2018
On 05/03/2018 06:33, David Holmes wrote:
> <swapped jdk-dev for core-libs-dev>
>
> Hi Ian,
>
> Do you run with -Xcheck:jni in production mode because you load
> unknown native code libraries? It's mainly intended as a diagnostic
> option to turn on if you encounter a possible JNI problem.
It does unusual to be running with -Xcheck:jni in a performance critical
environment. I would expect to see-Xcheck:jni when developing or
maintaining a library that uses JNI and drop the option the code has
been fulling tested.
Lots of good work was done in JDK 9 to replace the ZipFile
implementation with a Java implementation and it would be good to get
some results with a re-write of Inflater and Deflater. It would need
lots of testing, including startup. We would need have a dependency on
libz of course as it is needed by the VM to deflate entries in the
jimage container (when they are compressed) or access JAR files on the
boot class path.
-Alan
More information about the core-libs-dev
mailing list